Linking combo boxes based on the same table (1 Viewer)

stu_gnu

Registered User.
Local time
Today, 09:19
Joined
Jun 27, 2001
Messages
10
Hi
I have created a form which enters data into a table as a user types in the required data, within the form there are two combo boxes.
The first combo box contains a list of enquiry types which a user can select from. The second combo box contains shortened enquiry type codes which relate to the enquiry types. Unfortunately the second combo box has to be manually selected just like the first. Is it possible to programme the combo boxes so that when an enquiry type is selected in the first combo box the required enquiry type code is automatically selected in the second combo box.

I am at a lost for answers and can only perform basic functions in access.
many thanks
stu
 

Angello Pimental

Registered User.
Local time
Today, 09:19
Joined
May 9, 2001
Messages
92
I was just trying to do this recently....

Ok, what you want to do is store the enquiry code with the enquiry type in the first combo box. This is done by adding the enquiry code to the Row Source property of your first combobox.

Field: enquirytype enquirycode
Table: enquiries enquiries

Now once that is done you need to set the column properties of your first combobox to:

Column Count : 2
Column Widths : 1",0"
Bound Column : 1

Once this is done, in the afterupdate of combobox 1 put this code:

Me!combo2 = Me.combo1.Column(1)
Me.refresh

HTH, Give it a go and get back on any problems you have.

Angelo
 

Users who are viewing this thread

Top Bottom