Nz function question

C

Caroline

Hello,
I've searched on the Nz function but I am still confused. I am trying to
link two tables by 3 parameters (part#, op#, order#) which works well. I want
to get the # of hours worked, but in the table I'm trying to link to, the
data for some of these 3 parameters in the main table doesn't even exist. I
tried to put Hours:Nz([HRS],0) in the field so that when the data doesn't
exist in the table, a zero will be put in its place. However, when I run the
query, only the part#,op#,and order# with hours shows up in my results. Not
sure what I'm doing wrong here, but thanks in advance!
 
B

Beetle

Sounds like your query is using an Inner join but you need
an Outer join (left or right). Open your query in design view,
right click on the join line and you will see three options;

1) Only include rows where the joined fields from both tables
are equal.

2) Include ALL records form Table A and only those records
from Table B where the joined fields are equal.

3) Include ALL records from Table B and only those records
from Table A where the joined fields are equal.

Try changing your join type and see if it returns the results you want.
 

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