null parameters--all the records

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

Guest

i have a parameter query that gets its parameters from a form. i have date,
employee, job#, task #, etc. (every record in table is unique not because of
any one thing (job#) but through a combination of all these things plus some
others). anyway, if the user wants to list all the records for a certain job
# done between 2 dates, it's not happening. if the text box on the form is
left blank for any of the parameters, i want the query to spit out all of the
records that match, not the ones that have a null value.

thank you
--
 
change your criteria to...

Like [EnterParameter] & "*"


for each item.

NOTE: You should not use the number sign "#" in your field names. This is
used as a date delimeter in Access.
 
thank you sooooo much
--



Rick B said:
change your criteria to...

Like [EnterParameter] & "*"


for each item.

NOTE: You should not use the number sign "#" in your field names. This is
used as a date delimeter in Access.

--
Rick B



turkey said:
i have a parameter query that gets its parameters from a form. i have date,
employee, job#, task #, etc. (every record in table is unique not because of
any one thing (job#) but through a combination of all these things plus some
others). anyway, if the user wants to list all the records for a certain job
# done between 2 dates, it's not happening. if the text box on the form is
left blank for any of the parameters, i want the query to spit out all of the
records that match, not the ones that have a null value.

thank you
 
this worked when i used it for job but when i used it for more parameters
it's not working. i thought it might be mispellings so i copied and pasted
then changed the name of the control it gets the info from. is it not
possible to do more than 2, that wouldn't make much sense.

thanks so much

--



turkey said:
thank you sooooo much
--



Rick B said:
change your criteria to...

Like [EnterParameter] & "*"


for each item.

NOTE: You should not use the number sign "#" in your field names. This is
used as a date delimeter in Access.

--
Rick B



turkey said:
i have a parameter query that gets its parameters from a form. i have date,
employee, job#, task #, etc. (every record in table is unique not because of
any one thing (job#) but through a combination of all these things plus some
others). anyway, if the user wants to list all the records for a certain job
# done between 2 dates, it's not happening. if the text box on the form is
left blank for any of the parameters, i want the query to spit out all of the
records that match, not the ones that have a null value.

thank you
 
It is possible. Make sure they are all on the same line in the area to
create an "AND" relationship. Put each statement on separate rows in the
criteria section to create an "OR" statement.

--
Rick B



turkey said:
this worked when i used it for job but when i used it for more parameters
it's not working. i thought it might be mispellings so i copied and pasted
then changed the name of the control it gets the info from. is it not
possible to do more than 2, that wouldn't make much sense.

thanks so much

--



turkey said:
thank you sooooo much
--



Rick B said:
change your criteria to...

Like [EnterParameter] & "*"


for each item.

NOTE: You should not use the number sign "#" in your field names. This is
used as a date delimeter in Access.

--
Rick B



i have a parameter query that gets its parameters from a form. i have
date,
employee, job#, task #, etc. (every record in table is unique not because
of
any one thing (job#) but through a combination of all these things plus
some
others). anyway, if the user wants to list all the records for a certain
job
# done between 2 dates, it's not happening. if the text box on the form
is
left blank for any of the parameters, i want the query to spit out all of
the
records that match, not the ones that have a null value.

thank you
 
i got everything to work just fine except some entries in my table do have
null values and those records don't get returned. is it possible to have the
query return all the values plus the null values?

thanks

--




It is possible. Make sure they are all on the same line in the area to
create an "AND" relationship. Put each statement on separate rows in the
criteria section to create an "OR" statement.

--
Rick B



turkey said:
this worked when i used it for job but when i used it for more parameters
it's not working. i thought it might be mispellings so i copied and pasted
then changed the name of the control it gets the info from. is it not
possible to do more than 2, that wouldn't make much sense.

thanks so much

--



turkey said:
thank you sooooo much
--



:

change your criteria to...

Like [EnterParameter] & "*"


for each item.

NOTE: You should not use the number sign "#" in your field names. This is
used as a date delimeter in Access.

--
Rick B



i have a parameter query that gets its parameters from a form. i have
date,
employee, job#, task #, etc. (every record in table is unique not because
of
any one thing (job#) but through a combination of all these things plus
some
others). anyway, if the user wants to list all the records for a certain
job
# done between 2 dates, it's not happening. if the text box on the form
is
left blank for any of the parameters, i want the query to spit out all of
the
records that match, not the ones that have a null value.

thank you
 
I guess you'd have to use some combination of "OR" and pull the nulls.

What if the user enters a value though? Then do you still want the nulls?

I'd say just play around until you get what you are looking for.

--
Rick B



turkey said:
i got everything to work just fine except some entries in my table do have
null values and those records don't get returned. is it possible to have the
query return all the values plus the null values?

thanks

--




It is possible. Make sure they are all on the same line in the area to
create an "AND" relationship. Put each statement on separate rows in the
criteria section to create an "OR" statement.

--
Rick B



turkey said:
this worked when i used it for job but when i used it for more parameters
it's not working. i thought it might be mispellings so i copied and pasted
then changed the name of the control it gets the info from. is it not
possible to do more than 2, that wouldn't make much sense.

thanks so much

--



:

thank you sooooo much
--



:

change your criteria to...

Like [EnterParameter] & "*"


for each item.

NOTE: You should not use the number sign "#" in your field names. This is
used as a date delimeter in Access.

--
Rick B



i have a parameter query that gets its parameters from a form.
i
have
date,
employee, job#, task #, etc. (every record in table is unique
not
because
of
any one thing (job#) but through a combination of all these
things
plus
some
others). anyway, if the user wants to list all the records for
a
certain
job
# done between 2 dates, it's not happening. if the text box on
the
form
is
left blank for any of the parameters, i want the query to spit
out
all of
the
records that match, not the ones that have a null value.

thank you
 
If I understood you then you can use in each of the criteria in your query
this string

like nz([MyFieldNameFromTheForm],'*') and is not null
 
Back
Top