jbfraleigh
Registered User.
- Local time
- Today, 06:00
- Joined
- Aug 8, 2000
- Messages
- 22
Let's say that I have two tables:
Table Numbers:
ID VALUE
-- ------
1 123
2 456
3 789
Table Letters
ID VALUE NUM_LOOKUP
-- ------ -------------
1 ABC 1
2 DEF 3
Now, I'd like to use the lookup feature so that NUM_LOOKUP is a combo that displays the data in VALUE based on the relationship between ID in the two tables.
So, when you open the Letters table, you see the above. If you click in the NUM_LOOKUP field, you get a box that displays "123" for the first record and "789" for the second record.
I'm very close -- Here's what I have:
I tried the following:
Display Control: Combo Box
Row Source Type: Table/Query
Row Source: SELECT [ID],[VALUE] FROM [Numbers] AS [NUM_LOOKUP];
Bound Column: 1
Column Count: 2
Problem: This selects ALL values of ID from [Numbers].
I tried adding the following to my row source:
WHERE [Letters].[NUM_LOOKUP]=[Numbers].[ID]
This just gives me the "enter parameter" dialog box for [NUM_LOOKUP] and [ID].
Any help?
Thanks!
Table Numbers:
ID VALUE
-- ------
1 123
2 456
3 789
Table Letters
ID VALUE NUM_LOOKUP
-- ------ -------------
1 ABC 1
2 DEF 3
Now, I'd like to use the lookup feature so that NUM_LOOKUP is a combo that displays the data in VALUE based on the relationship between ID in the two tables.
So, when you open the Letters table, you see the above. If you click in the NUM_LOOKUP field, you get a box that displays "123" for the first record and "789" for the second record.
I'm very close -- Here's what I have:
I tried the following:
Display Control: Combo Box
Row Source Type: Table/Query
Row Source: SELECT [ID],[VALUE] FROM [Numbers] AS [NUM_LOOKUP];
Bound Column: 1
Column Count: 2
Problem: This selects ALL values of ID from [Numbers].
I tried adding the following to my row source:
WHERE [Letters].[NUM_LOOKUP]=[Numbers].[ID]
This just gives me the "enter parameter" dialog box for [NUM_LOOKUP] and [ID].
Any help?
Thanks!