pi********@hotmail.com wrote:
Sounds like a design flaw, because this is a simple query.
You should have 3 tables, not 2. Oh, and don't use punctuation in
object names, it will bite you. You can use underscores, but most
punctuation marks have very definite meanings in Access.
Client(ClientID (PK), ClientName...)
Service(ServiceID, ServiceText)
Uses(UClientID (PK1), UServiceID (PK2), DateUsed, ...)
Then the queries are easy.
add the 3 tables to the QBE grid, join on
Client.ClientID=Uses.UClientID
Service.ServiceID=Uses.UServiceID
and then filter on the month by using BETWEEN
pi********@hotmail.com wrote:
Sounds like a design flaw, because this is a simple query.
You should have 3 tables, not 2. Oh, and don't use punctuation in
object names, it will bite you. You can use underscores, but most
punctuation marks have very definite meanings in Access.
Client(ClientID (PK), ClientName...)
Service(ServiceID, ServiceText)
Uses(UClientID (PK1), UServiceID (PK2), DateUsed, ...)
Then the queries are easy.
add the 3 tables to the QBE grid, join on
Client.ClientID=Uses.UClientID
Service.ServiceID=Uses.UServiceID
and then filter on the month by using BETWEEN
I apologize for not explaining clearly.
I have FOUR separate tables:
tblClients (pkClientID), ClientName, Address, City...etc.
tblFoodAssistance (pkFoodAssistanceID) (fkClientID), AssistanceDate,
FoodSource...etc.
tblFinancialAssistance (pkFinanceAssistanceID) (fkClientID),
PaymentDate, CheckNumber, PaymentAmount...etc.
tblMentorAssistance (pkMentorSessionID) (fkClientID), SessionDate,
SessionLength, Mentor...etc.
While it's straightforward to select dates using tblClients and any one
of the other three tables, it falls apart if I consolidate in a single
query the ClientID, AssistanceDate, PaymentDate and SessionDate.
What I want to do is to wind up with a single query that will identify
whether a client utilized any or all of the services during a specified
period of time, preferably using a single BETWEEN...AND parameter
dialog.