Using a check to set query criteria

N

Nick

I am still having trouble sorting this out and I hope
someone can assist?
This was the initial answer to my question;
SELECT <ListofFields>
FROM Members LEFT JOIN Local
ON Members.Post_code = Local.Post_Code
WHERE Local.PostCode Is Not Null
Or Forms!Letter_Selection!Local = False

I have set up a database for my club, (Membership.mdb).
Having some members out of town, I need to be able to
include all or just select local members.

I have a table called tbLocal with a field; Post_Code.
Where I enter only local Post Codes.

I also have a query called Letter_Selection3 which also
has a field in it called Post_Code.
This is the SQL for the query.
SELECT qLetter_Addresses2.[Member No], qLetter_Addresses2.
[First Names], qLetter_Addresses2.LastName,
qLetter_Addresses2.[Postal Address],
qLetter_Addresses2.Suburb, qLetter_Addresses2.Post_Code,
qLetter_Addresses2.State, qLetter_Addresses2.[Preferred
Name], qLetter_Addresses2.Position,
qLetter_Addresses2.Life, qLetter_Addresses2.Active,
qLetter_Addresses2.MemberType
FROM qLetter_Addresses2
ORDER BY qLetter_Addresses2.[Postal Address];

I would like to use a check box called Local, in a form
called Letter_Selection as the criteria in my query.

Using the check box, Local, in a form, Letter_Selection,
to filter local addresses by Post Code.
If the checkbox in [Form]![Letter_Selection]![Local]
is,"True", only the addresses in the query
Letter_Selection3 with the Post Codes that match the table
tbLocal are returned in the query.
If the checkbox Local is," False", all addresses are
returned.

I have attempted to do this many times as per your details
above without much success so if you could assist one more
time I would appreciate it.

regards,
Nick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top