Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fun with combo boxes

Status
Not open for further replies.

354688

Instructor
May 5, 2001
7
0
0
GB
I have a form that allows data entry and I wish to create an alternative form that is identical but is simply used for display purposes with no data entry allowed.

Currently the form has a variety of different combo boxes that I wish to disable and just display the field content. If I change the properties of the combo box to a text box I loose the description and am left displaying that record’s ID number, which I don’t want. Therefore my question is this, is there a way in which you can alter the properties of a combo box so that the drop down arrow is not visible?
 
Why not just lock the combo boxes. The user might be able click on the combo box but they can not alter the contents.

Just an idee
 
Thanks for your suggestion, I have tried but know from experience that the user will then begin to wonder why the combo box is not working. The form needs to be completely idiot proof.
 
In your second form, why not use a list box instead of a combo box - no arrow and you can set up the row source to link to the contents of the combo box on form1, as I presume you have done with the combo box. Lock the listbox to prevent users accessing the data in it.
 
Simply have a text box of the same colour as the form background and position it directly over the combo box's down arrow.

Then make the textbox .Visible or not as required.


Does that solve your problem ?


Or the other way is:-

Give Description and ComboBoxNumber are in a table:-
tblComboBoxData
Fields ComboBoxId, ComboBoxDescription
And the combo box is bound to a field in the main table called DataFieldName


Then Replace the combo box with a text box and in the text box ControlSource place :-
=DLookup("ComboBoxDescription","tblComboBoxData","ComboBoxId = DataFieldName")


There's more than one way of skinning a cat.
Take your pick.
It still tastes like chicken.




G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.
 
try setting the text box's value to =dlookup("Field","
","Where [KeyField]="+Textbox.value+")

Provided the text value you want is in a table somewhere
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top