Query for Primary key

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want these all QuoteID not to appear in one of my report
QuoteID is my Primary key and this my query.

iif([QuoteId]<>(iif([QuoteId]>858 and [QuoteId]<910) and iif([QuoteId]>992
and [QuoteId]<1010)),[QuoteID])

Problem showing argument number is wrong.

What wrong in my query, im new so i dont know much about access

help will be appreciated, thanks in advance
 
Try this in the WHERE statement --
WHERE ([QuoteId]<>858 And [QuoteId]<>910 And [QuoteId]<>992 And
[QuoteId]<>1010)


zweet18 said:
I want these all QuoteID not to appear in one of my report
QuoteID is my Primary key and this my query.

iif([QuoteId]<>(iif([QuoteId]>858 and [QuoteId]<910) and iif([QuoteId]>992
and [QuoteId]<1010)),[QuoteID])

Problem showing argument number is wrong.

What wrong in my query, im new so i dont know much about access

help will be appreciated, thanks in advance
 
WHERE QuoteID NOT BETWEEN 858 AND 910
AND QuoteID NOT BETWEEN 992 AND 1010

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


zweet18 said:
I want these all QuoteID not to appear in one of my report
QuoteID is my Primary key and this my query.

iif([QuoteId]<>(iif([QuoteId]>858 and [QuoteId]<910) and iif([QuoteId]>992
and [QuoteId]<1010)),[QuoteID])

Problem showing argument number is wrong.

What wrong in my query, im new so i dont know much about access

help will be appreciated, thanks in advance
 
I cannot speak for Access, but you have me confused.
I realsie you know some of this.
If you do not want certain values to appear in a report you exclude them in
the query on which the report is based.
there is a BETWEEN keyword that you can use instead of > and <
in the design grid in the criteria row and Quoteid column you put:-
BETWEEN 859 AND 909
which is the same as:
[QuoteId]>858 and [QuoteId]<910)

If you do not want those values you put
NOT BETWEEN 859 AND 909

if you want to exclude another range of values as well, then you put:
NOT BETWEEN 859 AND 909 AND NOT BETWEEN ......


zweet18 said:
I want these all QuoteID not to appear in one of my report
QuoteID is my Primary key and this my query.

iif([QuoteId]<>(iif([QuoteId]>858 and [QuoteId]<910) and iif([QuoteId]>992
and [QuoteId]<1010)),[QuoteID])

Problem showing argument number is wrong.

What wrong in my query, im new so i dont know much about access

help will be appreciated, thanks in advance
 
David F Cox said:
I cannot speak for Access, but you have me confused.
I realsie you know some of this.
If you do not want certain values to appear in a report you exclude them in
the query on which the report is based.
there is a BETWEEN keyword that you can use instead of > and <
in the design grid in the criteria row and Quoteid column you put:-
BETWEEN 859 AND 909
which is the same as:
[QuoteId]>858 and [QuoteId]<910)

If you do not want those values you put
NOT BETWEEN 859 AND 909

if you want to exclude another range of values as well, then you put:
NOT BETWEEN 859 AND 909 AND NOT BETWEEN ......


zweet18 said:
I want these all QuoteID not to appear in one of my report
QuoteID is my Primary key and this my query.

iif([QuoteId]<>(iif([QuoteId]>858 and [QuoteId]<910) and iif([QuoteId]>992
and [QuoteId]<1010)),[QuoteID])

Problem showing argument number is wrong.

What wrong in my query, im new so i dont know much about access

help will be appreciated, thanks in advance


Thank you so much.....all of you help me a lot its make sense that's why i
keep thinking i know there's more easy way to get certain range of like you
said use the not between

You're d Best!
 

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

Back
Top