Returning two values from a single record ...I think ... (1 Viewer)

daievans

Registered User.
Local time
Today, 08:46
Joined
Apr 3, 2013
Messages
75
I have a very simple database for tracking movies. One Table has Theater Information, which includes Name and City.

In another related table I track attendance - when I choose a Theater name I'd like the City field to be populated, but I can't for the life of me see what I'm doing wrong ....

The relationship is a

Any insight/help/giggling would be appreciated (in that order :p)
 

plog

Banishment Pending
Local time
Today, 10:46
Joined
May 11, 2011
Messages
11,676
when I choose a Theater name I'd like the City field to be populated

You posted this in the Table sub-forum, which implies you want the City to be populated in the other table. That is incorrect. You do not store redundant data. If you know the theater's attendance in one table and in another table you know what city a theater is in, then you create a query when you want to bring all that data together. You do not move the City value from one table to the other.

Now, if you would like to display the city on a form, then you can do that via a DLookup (https://www.techonthenet.com/access/functions/domain/dlookup.php). You would create a new input and set its control source to the Dlookup. In the criteria argument of Dlookup you would have it use the selected Theater in the drop down.
 

daievans

Registered User.
Local time
Today, 08:46
Joined
Apr 3, 2013
Messages
75
You posted this in the Table sub-forum, which implies you want the City to be populated in the other table. That is incorrect. You do not store redundant data. If you know the theater's attendance in one table and in another table you know what city a theater is in, then you create a query when you want to bring all that data together. You do not move the City value from one table to the other.

Now, if you would like to display the city on a form, then you can do that via a DLookup (https://www.techonthenet.com/access/functions/domain/dlookup.php). You would create a new input and set its control source to the Dlookup. In the criteria argument of Dlookup you would have it use the selected Theater in the drop down.

Duh - Thanks plog - I had already done that elsewhere and it was working - I'm going to tell myself that I was tired and not thinking, however you know bettter :eek:
 

Users who are viewing this thread

Top Bottom