Sabtu, 28 Mei 2011

RE: [MS_AccessPros] Query not running right...

 

I know you didn't ask this question, but the truth is that most seasoned
developers go out of their way to avoid lookup fields in tables. They lead
to more problems than they solve. It sounds like you might be running into
just one of those problems. The lookup field, IF it is properly designed,
would be bound to the Primary Key field from tblCity, not to the value field
in that table. I assume you've done it that way. Therefore, when you try to
filter on "city", and then enter the name of a city, your query won't
actually be effective, as you've seen.

The preferred solution would be to rid the tblClient table of the lookup
field(s) and, instead, join the tblCity table into your query. That way, you
CAN filter on City name effectively.

HTH

George

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of
the_extinguisher_pro
Sent: Saturday, May 28, 2011 3:42 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Query not running right...

I have a table named "tblClients" and one of the fields is a look-up to
another table named 'tblCity". I tried to make a query to extract all my
clients from a certain City. While making the query I used this in the
criteria for the City field of the "tblClients", [Enter City]. When I run
the query i get the pop-up asking me to enter the City, when I do, the query
runs but I get no data, its compleetly blank. What am I doing wrong?

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar