hide drop down arrow on form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way I can display a combo box without the drop down arrow. I am
just using the box for display purposes on this particular form and do not
need to choose from the options.
 
Add an unbound text box.
Go to properties change the control source to the desired
field in your table.

Chris
 
thanks for the reply. This does display the data in the underlying field, but
the field in the table stores the code ie a number. I would like it to
display the name instead of the code. is there a way of displaying the name
instead of the code?
 
Make your combo box invisible and set the control source of the unbound text
field to the column of the combo box that holds the data you wish to
display. Something like:
=Me.cboWhatever.Column(1)
would display the contents of the second column in the combobox (column
counting starts at zero).
 
Why not just bind the text box to the row source table or query for
cboComboBox.Column(1)? If the form's record source is a query it should be
simple enough to add the field. If the record source is a table a query can
be created from the table, the field could be added (if necessary), and the
form's record source could be the query instead of the table. I expect the
hidden combo box would work, but I avoid hidden controls whenever I can.
 
The proper solution to this is to NOT use a combo box, but simply base the
form on a query, and thus the description field will be available like any
other field. If you have 3, or 7 different look up fields..then drop in
those 3, 7 additional tables into the query. You do need to use a left join
to make this work.

Remember to set the enabled property for the control on the screen to
dis-abled......as that query is going to be updatable...and you don't want
users updating the descriptions of a value being fetched from another
table!!
 
Is there a way I can display a combo box without the drop down arrow. I am
just using the box for display purposes on this particular form and do not
need to choose from the options.
If you must ......

Place a small label over the arrow.
Set it's backcolor to the same as the surrounding detail section.
Set it's BackStyle to Normal.
It will hide the arrow until you click in the control.

An even easier way to prevent users from fiddling with the control is
to set it's Locked property to Yes and Enabled property to No. The
arrow is visible, but the user cannot enter the control nor change the
data.
 
Back
Top