Parameter Query Null Response Error

  • Thread starter Bruister via AccessMonster.com
  • Start date
B

Bruister via AccessMonster.com

I have some parameter queries in which I enter a [Month] as a criteria. I
also want to be able to return all records if I want. I have seen the
instruction on adding an OR line with Like [Month] Is Not Null under the
original criteria. I run this from design view and it works as it should but
the second OR line statement does not save on exiting the query. It has
vanished when I go back in to check. What have I done wrong?
 
B

Bruister via AccessMonster.com

Bruister said:
I have some parameter queries in which I enter a [Month] as a criteria. I
also want to be able to return all records if I want. I have seen the
instruction on adding an OR line with Like [Month] Is Not Null under the
original criteria. I run this from design view and it works as it should but
the second OR line statement does not save on exiting the query. It has
vanished when I go back in to check. What have I done wrong?

I meant to say Like [Month] Is Null. I have entered it correctly but still
does not save!
 
D

Douglas J. Steele

Like [Month] Is Null won't result in valid SQL. Assuming you've got a field
named, say, TransactionMonth in your table, put

Like [Month] Or ([Month] Is Null)

as the criteria under it.


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Bruister via AccessMonster.com said:
Bruister said:
I have some parameter queries in which I enter a [Month] as a criteria. I
also want to be able to return all records if I want. I have seen the
instruction on adding an OR line with Like [Month] Is Not Null under the
original criteria. I run this from design view and it works as it should
but
the second OR line statement does not save on exiting the query. It has
vanished when I go back in to check. What have I done wrong?

I meant to say Like [Month] Is Null. I have entered it correctly but still
does not save!
 

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