Help Not getting proper result from simply query


A

Alex Martinez

Hello,

I have two tables in my query. Table one is call "Claims" table two is
called "Billed" The claims table has a field called "policy number" which
will match with the billed table field "policynumber" in the query. I get
the results what I needed (inter join), but there are two fields that also
comes into play that I want in my query. On the Claims table there is a
field called "TypeofAudit", which is numerical - 0-9 and in the Billed
table there is a field called "InvoiceType". What I want to do in the query
is to have the TypeofAudit don't included <>3 and the InvoiceType be "AD".
If I code in the TypeofAudit as follows <>3 and InvoiceType = "AD" I get
an error message of data mismatch. If I go in the design mode and type <>3
in the TypeofAudit and InvoiceType = "AD" seperately I still don't get the
right results. All I want to do is to exclude the TypeofAudit (<>3) only if
there is a InvoiceType ="AD". Can someone help me. Thank you in advance.
 
Ad

Advertisements

G

Guest

Add a calculated field to your query with an expression like this:
=([InvoiceType]="AD") And ([TypeofAudit]<>3)
Set the criteria to False; this should make it exclude the records where
both are true.
 
Ad

Advertisements

A

Alex Martinez

Thanks, I will give it a try.

Regards,

K Dales said:
Add a calculated field to your query with an expression like this:
=([InvoiceType]="AD") And ([TypeofAudit]<>3)
Set the criteria to False; this should make it exclude the records where
both are true.
--
- K Dales


Alex Martinez said:
Hello,

I have two tables in my query. Table one is call "Claims" table two is
called "Billed" The claims table has a field called "policy number"
which
will match with the billed table field "policynumber" in the query. I
get
the results what I needed (inter join), but there are two fields that
also
comes into play that I want in my query. On the Claims table there is a
field called "TypeofAudit", which is numerical - 0-9 and in the Billed
table there is a field called "InvoiceType". What I want to do in the
query
is to have the TypeofAudit don't included <>3 and the InvoiceType be
"AD".
If I code in the TypeofAudit as follows <>3 and InvoiceType = "AD" I
get
an error message of data mismatch. If I go in the design mode and type
<>3
in the TypeofAudit and InvoiceType = "AD" seperately I still don't get
the
right results. All I want to do is to exclude the TypeofAudit (<>3) only
if
there is a InvoiceType ="AD". Can someone help me. Thank you in
advance.
 

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