View Full Version : drop down + look ups


mith33
03-31-2002, 07:32 AM
hi i need help

i am designing a database a very simple one from scratch and i want to place a look up box on the main form so when i click the drop down i can select the names in it. i have also got another text box on the form. how can i get the information clicked form the drop down to appear on the text box.

if you want i can provide a screen shot

please help

tbeegz
04-01-2002, 07:24 AM
In the Control source for the text box type:

=[combo box name]

Jack Cowley
04-01-2002, 08:03 AM
What appears in your text box depends on what column is bound in your Combo box. If the first column is the what you want to show in your text box then this code in the After Update event of the Combo box will fill the text box:

Me.TextBoxName = Me.ComboBoxName

If the data is in another column of the Combo box then use code like this:

Me.TextBoxName = Me.ComboBoxName.Column(x)

x is the number of the column minus 1 as Combo boxes are zero based.