hiding drop down arrows

  • Thread starter Thread starter JulieD
  • Start date Start date
J

JulieD

Hi All

i have a continuous subform embedded in a multipage form which has for each
main record a large number of related records (main record - school name,
related info - capital expenditure).

These related records can not be edited or deleted, but need to be able to
be added to.

So what i would like to do is "hide" the drop down arrows on the existing
records but leave it for the new one (for the fields that get their
information from related tables). Is this possible? Using Access 2000.

Cheers
JulieD
 
JulieD said:
Hi All

i have a continuous subform embedded in a multipage form which has for each
main record a large number of related records (main record - school name,
related info - capital expenditure).

These related records can not be edited or deleted, but need to be able to
be added to.

So what i would like to do is "hide" the drop down arrows on the existing
records but leave it for the new one (for the fields that get their
information from related tables). Is this possible? Using Access 2000.

Cheers
JulieD

If you mean the drop-down arrows on combo boxes then no, you can't hide
them. However, you can change whether the subform is editable by putting
the following code in it's Current event:

Me.AllowEdits = Me.NewRecord

And, in the AfterInsert event:

Me.AllowEdits = False
 
Hi Brian

drats ... i'ld really like to get rid of the combo box down arrows - do you
know if i can put code into a continuous form that changes a combo box to a
text box if it has data in it and leaves it as a combo box if it hasn't (i'm
guessing this is probably wishful thinking!).

Cheers
JulieD
 
JulieD said:
Hi Brian

drats ... i'ld really like to get rid of the combo box down arrows - do you
know if i can put code into a continuous form that changes a combo box to a
text box if it has data in it and leaves it as a combo box if it hasn't (i'm
guessing this is probably wishful thinking!).

Cheers
JulieD

Hi Julie,

There's no way of doing it that I'm aware of. I'm not sure exactly what
you've got against the combo box down arrows, but if it's really that big an
issue you'll just have to change them all to text boxes, and use a pop-up
form for entering new records instead of having them entered directly in the
subform.
 
Hi Brian

drats ... i'ld really like to get rid of the combo box down arrows - do you
know if i can put code into a continuous form that changes a combo box to a
text box if it has data in it and leaves it as a combo box if it hasn't (i'm
guessing this is probably wishful thinking!).
JulieD


Julie, I'm with Brian here. I'd really like to know what is wrong
with the drop arrows in what you're trying to do.

This is because the question has never in my experience, been asked
before which means you may be trying something that has an easier and
complete solution elsewhere.


Cheers,
Brett
 
Hi Brett

i have a multipage form containing information for 800+ schools ... each of
the schools have multiple records for capital expenditure & maintenence
expenditure on them over the last 10 years - this historical data has all
been imported.

I am displaying these related records in a continuous form on the second
page of the multitab form. As there is already a considerable number of
related records which can't be edited or deleted, yet new records need to be
able to be manually added i find it's just looking "very busy" with combo
box arrows on three of the four fields (category / sub-category / financial
year / amount) and as the data can't be changed the combo box arrows on them
are redundant (however, they're still needed to allow new records to be
entered). I know its not a bit deal and i can live with it, but as there is
some quite amazing stuff that people here do with Access i just thought i
would ask.

Cheers
JulieD
 
JulieD said:
Hi Brett

i have a multipage form containing information for 800+ schools ... each of
the schools have multiple records for capital expenditure & maintenence
expenditure on them over the last 10 years - this historical data has all
been imported.

I am displaying these related records in a continuous form on the second
page of the multitab form. As there is already a considerable number of
related records which can't be edited or deleted, yet new records need to be
able to be manually added i find it's just looking "very busy" with combo
box arrows on three of the four fields (category / sub-category / financial
year / amount) and as the data can't be changed the combo box arrows on them
are redundant (however, they're still needed to allow new records to be
entered). I know its not a bit deal and i can live with it, but as there is
some quite amazing stuff that people here do with Access i just thought i
would ask.

You can place TextBoxes bound to the same fields on top of the ComboBoxes
and size them so they obscure the arrows. Then in the GotFocus event of
each TextBox change focus to the ComboBox underneath. The arrows will only
show when that particular field actually has focus.
 
Just place a small Rectangle of the same size or slightly bigger than the
drop-down arrow to cover it. When the ComboBox has the Focus, it will have
the highest Z-order and the drop-down arrow will be visible.

For the Rectangle to blend it with the background, set Proerties of the
Rectangle as follows:

* BackStyle: Normal
* BackColor: same as the BackColor of the Form Section
* SpecialEffect: Flat
* BorderStyle: Transparent.
 
You can place TextBoxes bound to the same fields on top of the ComboBoxes
and size them so they obscure the arrows. Then in the GotFocus event of
each TextBox change focus to the ComboBox underneath. The arrows will only
show when that particular field actually has focus.

Except, if they are multi-column combos with the bound column hidden, then
you've got a problem displaying the correct value in the text box. Van's
solution is neat and doesn't have this issue.
 
Brian said:
Except, if they are multi-column combos with the bound column hidden, then
you've got a problem displaying the correct value in the text box. Van's
solution is neat and doesn't have this issue.

Well actually you can have the TextBox display any desired column from the
ComboBox so that's not really an issue. It boils down to whether you want the
controls to look like they are butted right up against each other or want to
have visible space between them. In the case of the former I would use my
suggestion, otherwise Van's solution is definitely easier.
 
Rick Brandt said:
Well actually you can have the TextBox display any desired column from the
ComboBox so that's not really an issue. It boils down to whether you want the
controls to look like they are butted right up against each other or want to
have visible space between them. In the case of the former I would use my
suggestion, otherwise Van's solution is definitely easier.

Yes, of course it CAN be done, but not by simply binding the text box to the
same field as the combo - it's a bit more fiddly, is all I'm saying.
 
Back
Top