parameter query - return all or part

G

Guest

I am not sure how to phrase this, so if it has been addressed in a previous
post, i apologize. I have a field in a parameter query that I could like to
be able to either have someone hit enter and return all information, or enter
a specific number and return just the records in that segment.

For example:
[Enter Grant] one types in FW-3-L
[Enter Segment] either hit enter and all segments (all 200] area returned,
or just enter 100 and only those records in segment 100 are returned.

You assistance is appreciated!

Linda
 
J

John Spencer

Not sure what you are asking. You might be able to do

Field: Grant
Criteria: [Enter Grant]

Field: Segment
Criteria: Like (Nz([Enter Segment],"*")

That will return everything that matches Grant and Segment if values are
entered. If no value is entered for Segment, it will return all matches for
Grant and all segments that have a value. If Segment can be null then you
can try the following. This will ignore any criteria against segment is you
leave the response to [Enter Segment] blank.

Field: Segment
Critieria: [Enter Segment] or [Enter Segment] is Null

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
G

Guest

John, you grasped the issue exactly! I am getting an invalid syntax error,
though.

Thanks,

Linda

John Spencer said:
Not sure what you are asking. You might be able to do

Field: Grant
Criteria: [Enter Grant]

Field: Segment
Criteria: Like (Nz([Enter Segment],"*")

That will return everything that matches Grant and Segment if values are
entered. If no value is entered for Segment, it will return all matches for
Grant and all segments that have a value. If Segment can be null then you
can try the following. This will ignore any criteria against segment is you
leave the response to [Enter Segment] blank.

Field: Segment
Critieria: [Enter Segment] or [Enter Segment] is Null

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Linda said:
I am not sure how to phrase this, so if it has been addressed in a previous
post, i apologize. I have a field in a parameter query that I could like
to
be able to either have someone hit enter and return all information, or
enter
a specific number and return just the records in that segment.

For example:
[Enter Grant] one types in FW-3-L
[Enter Segment] either hit enter and all segments (all 200] area returned,
or just enter 100 and only those records in segment 100 are returned.

You assistance is appreciated!

Linda
 
J

John Spencer

My error, I left off a closing parentheses
Field: Segment
Criteria: Like (Nz([Enter Segment],"*"))

Left and right parentheses must always come in pairs.

If you did not use the above, then tell us what you did use and the text of
the error message.


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Linda said:
John, you grasped the issue exactly! I am getting an invalid syntax
error,
though.

Thanks,

Linda

John Spencer said:
Not sure what you are asking. You might be able to do

Field: Grant
Criteria: [Enter Grant]

Field: Segment
Criteria: Like (Nz([Enter Segment],"*")

That will return everything that matches Grant and Segment if values are
entered. If no value is entered for Segment, it will return all matches
for
Grant and all segments that have a value. If Segment can be null then
you
can try the following. This will ignore any criteria against segment is
you
leave the response to [Enter Segment] blank.

Field: Segment
Critieria: [Enter Segment] or [Enter Segment] is Null

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Linda said:
I am not sure how to phrase this, so if it has been addressed in a
previous
post, i apologize. I have a field in a parameter query that I could
like
to
be able to either have someone hit enter and return all information, or
enter
a specific number and return just the records in that segment.

For example:
[Enter Grant] one types in FW-3-L
[Enter Segment] either hit enter and all segments (all 200] area
returned,
or just enter 100 and only those records in segment 100 are returned.

You assistance is appreciated!

Linda
 
G

Guest

That did it!! Thank you so much, you've made my day.

Linda

John Spencer said:
My error, I left off a closing parentheses
Field: Segment
Criteria: Like (Nz([Enter Segment],"*"))

Left and right parentheses must always come in pairs.

If you did not use the above, then tell us what you did use and the text of
the error message.


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Linda said:
John, you grasped the issue exactly! I am getting an invalid syntax
error,
though.

Thanks,

Linda

John Spencer said:
Not sure what you are asking. You might be able to do

Field: Grant
Criteria: [Enter Grant]

Field: Segment
Criteria: Like (Nz([Enter Segment],"*")

That will return everything that matches Grant and Segment if values are
entered. If no value is entered for Segment, it will return all matches
for
Grant and all segments that have a value. If Segment can be null then
you
can try the following. This will ignore any criteria against segment is
you
leave the response to [Enter Segment] blank.

Field: Segment
Critieria: [Enter Segment] or [Enter Segment] is Null

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

I am not sure how to phrase this, so if it has been addressed in a
previous
post, i apologize. I have a field in a parameter query that I could
like
to
be able to either have someone hit enter and return all information, or
enter
a specific number and return just the records in that segment.

For example:
[Enter Grant] one types in FW-3-L
[Enter Segment] either hit enter and all segments (all 200] area
returned,
or just enter 100 and only those records in segment 100 are returned.

You assistance is appreciated!

Linda
 

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