A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Please help with Query Criteria



 
 
Thread Tools Display Modes
  #1  
Old July 15th, 2008, 04:42 PM posted to microsoft.public.access.queries
please help
external usenet poster
 
Posts: 79
Default Please help with Query Criteria

Hello all,

I have a number field in my append query. Instead of hard coated the
criteria with the formula "0" on that field, I want to make it to prompt
the user for a value when the query is ran. I tried the formula:

Not Like nz([Please enter a value for exclusion],"*")

That formula does not seem to work.

Please help.

Thanks.
  #2  
Old July 15th, 2008, 08:51 PM posted to microsoft.public.access.queries
John W. Vinson/MVP
external usenet poster
 
Posts: 325
Default Please help with Query Criteria


"Please Help" wrote in message
...
Hello all,

I have a number field in my append query. Instead of hard coated the
criteria with the formula "0" on that field, I want to make it to prompt
the user for a value when the query is ran. I tried the formula:

Not Like nz([Please enter a value for exclusion],"*")

That formula does not seem to work.


The LIKE operator is intended for partial matches using string values. It
can give peculiar results with numbers and should generally not be used.

All you need is

[Please enter a value to be excluded:]



  #3  
Old July 16th, 2008, 02:49 AM posted to microsoft.public.access.queries
please help
external usenet poster
 
Posts: 79
Default Please help with Query Criteria

Hi John,

Thanks for your response.

In addition to make the criteria to prompt the user for a value, I also want
to make that criteria an optional criteria, which means users do not have to
enter a value and query then would show all the records. I thought my
formula would work.

Please help. Also can you help me with the post that I posted yesterday
with the post name "Please help me with my query"?

Thanks.

"John W. Vinson/MVP" wrote:


"Please Help" wrote in message
...
Hello all,

I have a number field in my append query. Instead of hard coated the
criteria with the formula "0" on that field, I want to make it to prompt
the user for a value when the query is ran. I tried the formula:

Not Like nz([Please enter a value for exclusion],"*")

That formula does not seem to work.


The LIKE operator is intended for partial matches using string values. It
can give peculiar results with numbers and should generally not be used.

All you need is

[Please enter a value to be excluded:]




  #4  
Old July 16th, 2008, 02:55 AM posted to microsoft.public.access.queries
John W. Vinson/MVP
external usenet poster
 
Posts: 325
Default Please help with Query Criteria


"Please Help" wrote in message
...
Hi John,

Thanks for your response.

In addition to make the criteria to prompt the user for a value, I also
want
to make that criteria an optional criteria, which means users do not have
to
enter a value and query then would show all the records. I thought my
formula would work.



This should do it:

[Please enter a value to be excluded:] OR [Please enter a value to be
excluded:] IS NULL


Please help. Also can you help me with the post that I posted yesterday
with the post name "Please help me with my query"?


I'll try to find the thread.

Thanks.

"John W. Vinson/MVP" wrote:


"Please Help" wrote in message
...
Hello all,

I have a number field in my append query. Instead of hard coated the
criteria with the formula "0" on that field, I want to make it to
prompt
the user for a value when the query is ran. I tried the formula:

Not Like nz([Please enter a value for exclusion],"*")

That formula does not seem to work.


The LIKE operator is intended for partial matches using string values. It
can give peculiar results with numbers and should generally not be used.

All you need is

[Please enter a value to be excluded:]






  #5  
Old July 16th, 2008, 02:16 PM posted to microsoft.public.access.queries
please help
external usenet poster
 
Posts: 79
Default Please help with Query Criteria

Good morning John,

Thank you very much for your help and your consideration on my other tread.

I am pulling my hairs on how to do on my other tread.

Thanks.

"John W. Vinson/MVP" wrote:


"Please Help" wrote in message
...
Hi John,

Thanks for your response.

In addition to make the criteria to prompt the user for a value, I also
want
to make that criteria an optional criteria, which means users do not have
to
enter a value and query then would show all the records. I thought my
formula would work.



This should do it:

[Please enter a value to be excluded:] OR [Please enter a value to be
excluded:] IS NULL


Please help. Also can you help me with the post that I posted yesterday
with the post name "Please help me with my query"?


I'll try to find the thread.

Thanks.

"John W. Vinson/MVP" wrote:


"Please Help" wrote in message
...
Hello all,

I have a number field in my append query. Instead of hard coated the
criteria with the formula "0" on that field, I want to make it to
prompt
the user for a value when the query is ran. I tried the formula:

Not Like nz([Please enter a value for exclusion],"*")

That formula does not seem to work.

The LIKE operator is intended for partial matches using string values. It
can give peculiar results with numbers and should generally not be used.

All you need is

[Please enter a value to be excluded:]







 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.