display something based on combo box

RpbertS

Registered User.
Local time
Today, 12:24
Joined
Feb 14, 2000
Messages
93
hi okay,

I have a form that has a combo box on it and a text box. When I select the a value you in the combo box I'd like the matching information to appear in the text box.

The combo box is getting its data from one table that has only 2 fields in it.

Report Name and Report Description

simpley put, when I select a record name i want the description also.

thanks,
Rpb
 
I am presuming that the combo box is showing the first column of data and that you want the second column shown in the text box.

Use the Event:On Change part of the combo properties and create the following code.

The column count is 1 as Column(0) is the first column (offset theory).

Private Sub cmbTEST_Change()
Me![txtTest] = Me![cmbTEST].Column(1)
End Sub

Any probs then email me at shg@bts.co.uk but be warned that I go home in an hour (17:30 BST, 16:30 GMT) and won't be back till Monday

HTH

Simon
 
worked great thanks
 
The Change event runs after each character is typed. You really should use the combobox's AfterUpdate event.
 

Users who are viewing this thread

Back
Top Bottom