Trouble with Lookup Tables?

tomadom

Registered User.
Local time
Today, 15:43
Joined
Mar 5, 2016
Messages
13
I have created a lookup in an access table field which is based on the values in another table.

My understanding is that the table I'm doing the lookup in is supposed to display the looked up value. In my case it hasn't.

Would anyone know if there is a setting to make this happen?
 
Most developers avoid Lookup Fields in tables like the plague. Putting a ComboBox lookup on a Form is just fine.
 
Hi there and welcome to the forum.

To get better help, describe the exact symptoms of the failure, for instance, this is not enough information from which to troubleshoot . . .
. . . supposed to display the looked up value. In my case it hasn't.
What, exactly, was not displayed?

Hope this helps,
 
Sorry about that.. I'll provide more detail.

Here are two tables. Table 1 and Table 2.

Table 1:

ID----field1----field2
1 -----one----- monday
2 -----two-----tuesday
3 -----three-----wednesday


Table 2:

ID-----field1
1 ------ january
2 ------february
3 ------march


I want to do a lookup in Table 1 field 1. So... using the lookup wizard I choose table 2 as my source table and Table 1 field 1 to place my lookup values. Obviously the ID fields in both tables serve as a common value to do the lookup against.

As a result of my lookup, I would expect to see in Table 1 the below:

Table 1:

ID----- field1----- field2
1 ------january------monday
2 ------february------tuesday
3 ------march------wednesday

But instead I see the same old Table1 without the new lookup values cascaded into field1. But.. I don't. Instead, when I click on any field 1 value I get a combox with a list of the table2 values in it.

If, when I step through the lookup wizard, I select (at the last step) to 'cascade results and enforce referential integrity' I get an error 'THE TABLE COULD NOT BE SAVED'.

I, at the very least, wanted to see the new values displayed in Table 1 field 1 corresponding the the values in Table 2 field 1 where Table1 ID = Table2 ID.

Why are these results not displayed. Why do I get this error ('the table could not be saved') when I opt to cascade the results?
 
I just solved it.
It was all a misconception. The table I'm doing the lookup in needs to have a common field with the lookup table. It's that common field in the table I'm doing the lookup in which is being replaced.

It should have been obvious.
 
The values in your lookup tables suggest you are reinventing the wheel. Access already has functions to return the day and month names directly from day numbers, month numbers and dates.
 
The values in your lookup tables suggest you are reinventing the wheel. Access already has functions to return the day and month names directly from day numbers, month numbers and dates.

These are just experimental tables I made up on the fly. I could have put anything there.
 

Users who are viewing this thread

Back
Top Bottom