dbaldacchino
New member
- Local time
- Yesterday, 18:31
- Joined
- Sep 19, 2008
- Messages
- 7
I set up a query to be used as the Row Source for a table lookup field. I'm attaching a simplified file to make it easier to understand (saved to 2003 but I'm using 2007).
I have the following tables:
t_Discipline with fields ID, Discipline, Network_Path (this field is irrelevant for this example)
t_Details with fields ID, Discipline, Detail_Type
t_Subfolders with fields ID, Discipline, Detail_Type, Subfolder (this field is irrelevant for this example)
The ID of t_Discipline is joined to the Discipline field of t_Details and t_Subfolders (one to many). Both Discipline fields in these tables use t_Discipline as the lookup table.
If you run the query called "Lookup Query", you are prompted to enter the parameter value "t_details.discipline", which is what I set as criteria. If you type 1 for example, you'll get 4 rows that correspond to that value (the Detail_Type will show Type 1 through Type 4). This seems to be working fine, however I would like this query to automatically list the appropriate records when used as a lookup query, based on the value of t_details.discipline for the current record. But this isn't happening and the dialog mentioned above pops up asking for the parameter value.
How can I get this to work so that the user is presented with the relevant data based on the record value of the field Discipline (in t_Details)? If for example the user clicks in the field "Detail_Type" in t.Details for the first record (Discipline set to Disc1), then the presented values should automatically be Type 1, Type 2, Type 3 and Type 4. If the user clicks in the second record where Discipline is set to Disc2, the values presented should be Type A, Type B and Type C. Any help is greatly appreciated and I hope I explained myself properly. Thanks in advance!
I have the following tables:
t_Discipline with fields ID, Discipline, Network_Path (this field is irrelevant for this example)
t_Details with fields ID, Discipline, Detail_Type
t_Subfolders with fields ID, Discipline, Detail_Type, Subfolder (this field is irrelevant for this example)
The ID of t_Discipline is joined to the Discipline field of t_Details and t_Subfolders (one to many). Both Discipline fields in these tables use t_Discipline as the lookup table.
If you run the query called "Lookup Query", you are prompted to enter the parameter value "t_details.discipline", which is what I set as criteria. If you type 1 for example, you'll get 4 rows that correspond to that value (the Detail_Type will show Type 1 through Type 4). This seems to be working fine, however I would like this query to automatically list the appropriate records when used as a lookup query, based on the value of t_details.discipline for the current record. But this isn't happening and the dialog mentioned above pops up asking for the parameter value.
How can I get this to work so that the user is presented with the relevant data based on the record value of the field Discipline (in t_Details)? If for example the user clicks in the field "Detail_Type" in t.Details for the first record (Discipline set to Disc1), then the presented values should automatically be Type 1, Type 2, Type 3 and Type 4. If the user clicks in the second record where Discipline is set to Disc2, the values presented should be Type A, Type B and Type C. Any help is greatly appreciated and I hope I explained myself properly. Thanks in advance!