Display data when certain data is entered (1 Viewer)

ego

New member
Local time
Today, 21:51
Joined
May 27, 2009
Messages
1
How do I display a value list in a table with certain data based on what was entered in the previous field?

I have a database with two fiels i want to link. Job and SubJob. Is there a way to display a list of SubJobs of the main Job after a job has been entered.

example

If I enter IT into the Job field and when i open the drop down list of SubJob it displays jobs relevant to what was entered into the Job field.

OR

If I enter Medical into Job field i want a list that has doctors, nurses to drop down in SubJobs.

I have a long list of jobs and subjobs and this is the easiest way I have thought of doing it but I dont really know

This is how i would like my database to work but also i would like it fairly simple to use and add to at a later stage if needed to.

Any help is appreciated

Thanks

Dion
 

neileg

AWF VIP
Local time
Today, 10:51
Joined
Dec 4, 2002
Messages
5,975
Youdon't do this at table level, you do it in a form. Do a search in these forums for cascading combo boxes, 'caus that's what you need to do this.
 

seopositive2

New member
Local time
Today, 02:51
Joined
May 29, 2009
Messages
9
The problem is in your if test. The test will only return true if oControl is null, which it will never be, because oControl is a combo box. You should be testing oControl.Text, which returns the text that is displayed in the combo box. Also, don't test it for being Null, test for an empty string.
 

Users who are viewing this thread

Top Bottom