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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Crisis....

Status
Not open for further replies.

ColinN

Programmer
Joined
Apr 28, 2003
Messages
3
Location
GB
Hello, My name is Colin and i have a problem with Access 97 Combo Boxes.
I want to make my database to take the results of one combo box choice and use that selection to alter the list of choices in combo box 2.
I have two tables in my database. These are Main and Sheet1.

Main -
Name
Regional Centre
Comments
Date

Sheet1 -
Name
Region

I hope that someone has some ideas as to how i can sort this out.

i tired to write code using the expression builder and have managed to create this:

SELECT Sheet1.Field3 FROM Main INNER JOIN Sheet1 ON Main.[Relationship Manager Centre] = Sheet1.Region WHERE ((([Forms]![Main]![Regional Centre]) Like [Sheet1]![Region]));

unfortunately this does not work as expected. Any ideas?
 
You could try to requery the 2nd combo box using the on_change event of the 1st.
 

SELECT DISTINCT[Second Table Name].Column Name

FROM[The Name of your second table]

WHERE(([Your Second Table Name].Your Link Column To the
First table)=[FORMS]![The Name Of The Form That
Contains the First Combo Box]![The Name Of your
First Combo Box]))

ORDER BY[Name of the Second Table].The name of the field
you want to display in the second combo box]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top