Simple Query Help

C

cabong

I have these 2 tables:

tblPayOut laid out like this (no primary keys):
Year Employee Amt

tblPayment laid out like this (primary=PmtNo):
PmtNo Year Employee Amt Paid(yes/no)

tblPayOut represents all amts that have to be paid to employees
tblPayment represents amount paid to date

I'm trying to build a query where ALL records in tlbPayOut would b
shown (showing Year and Employee fields), with a 3rd column showing th
paid(yes/no) from the tblPayment. Basically I want a list of what wa
unpaid to date based on the Paid(Yes/No).

I'm getting all kind of results beside what I want, my biggest proble
is to show all records from tblPayout eventhough there's n
corresponding payment yet.

Can any of you gurus help me?

TI
 
N

Nikos Yannacopoulos

In your design view, make sure the two tables are joined on the two fields
Year and Employee; then double-click on each join (the line) to get the Join
Properties window, and in there select option 2 or 3 in the lower part, the
one that says "Join all recores from tblPayOut and only those records from
tblPayment...". If you get it rightm the join line should change to an arrow
pointing toward the Paymnets table. This will get you what you want.

HTH,
Nikos
 

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