access 2003 query-criteria

L

Leslie Porter OHV

Hello.
I have a field with a critera like this....

Like [Enter Batch 1*] Or Like [Enter Batch 2*] Or Like [Enter Batch 3*] Or
Like [Enter Batch 4*]

what i need to do is create a variable to display on a report combining
those 4 inputs. i cant seem to get anything in my limited knowledge to work
=]

Thanks in advance for any help..

Leslie
 
K

KARL DEWEY

Change the criteria to this --
Like [Enter Batch 1*] &"*" Or Like [Enter Batch 2*] &"*" Or Like [Enter
Batch 3*] &"*" Or Like [Enter Batch 4*] &"*"

In design view add a new field in Field row of the grid like this --
Report_Criteria: [Enter Batch 1*] &(", " + [Enter Batch 2*]) &(", " +
[Enter Batch 3*]) &(", " + [Enter Batch 4*])

It is best to copy and paste the parts of the criteria so they will be
identical in the field row as in the criteria row.
 
J

John Spencer

You should be able to use the following as the source for a control in the report.

Control Source: = [Enter Batch 1*] & " " & [Enter Batch 2*] & " " & [Enter
Batch 3*] & " " & [Enter Batch 4*]


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
L

Leslie Porter OHV

so if i have the same criteria input it will only ask once?

KARL DEWEY said:
Change the criteria to this --
Like [Enter Batch 1*] &"*" Or Like [Enter Batch 2*] &"*" Or Like [Enter
Batch 3*] &"*" Or Like [Enter Batch 4*] &"*"

In design view add a new field in Field row of the grid like this --
Report_Criteria: [Enter Batch 1*] &(", " + [Enter Batch 2*]) &(", " +
[Enter Batch 3*]) &(", " + [Enter Batch 4*])

It is best to copy and paste the parts of the criteria so they will be
identical in the field row as in the criteria row.
--
KARL DEWEY
Build a little - Test a little


Leslie Porter OHV said:
Hello.
I have a field with a critera like this....

Like [Enter Batch 1*] Or Like [Enter Batch 2*] Or Like [Enter Batch 3*] Or
Like [Enter Batch 4*]

what i need to do is create a variable to display on a report combining
those 4 inputs. i cant seem to get anything in my limited knowledge to work
=]

Thanks in advance for any help..

Leslie
 
K

KARL DEWEY

No, it will ask four times.
--
KARL DEWEY
Build a little - Test a little


Leslie Porter OHV said:
so if i have the same criteria input it will only ask once?

KARL DEWEY said:
Change the criteria to this --
Like [Enter Batch 1*] &"*" Or Like [Enter Batch 2*] &"*" Or Like [Enter
Batch 3*] &"*" Or Like [Enter Batch 4*] &"*"

In design view add a new field in Field row of the grid like this --
Report_Criteria: [Enter Batch 1*] &(", " + [Enter Batch 2*]) &(", " +
[Enter Batch 3*]) &(", " + [Enter Batch 4*])

It is best to copy and paste the parts of the criteria so they will be
identical in the field row as in the criteria row.
--
KARL DEWEY
Build a little - Test a little


Leslie Porter OHV said:
Hello.
I have a field with a critera like this....

Like [Enter Batch 1*] Or Like [Enter Batch 2*] Or Like [Enter Batch 3*] Or
Like [Enter Batch 4*]

what i need to do is create a variable to display on a report combining
those 4 inputs. i cant seem to get anything in my limited knowledge to work
=]

Thanks in advance for any help..

Leslie
 
L

Leslie Porter OHV

so if im understanding it right...

anything i use in the [ xyz ] to ask for an input becomes a variable named [
xyz ]?
and is this global as long as the query is active?

John Spencer said:
You should be able to use the following as the source for a control in the report.

Control Source: = [Enter Batch 1*] & " " & [Enter Batch 2*] & " " & [Enter
Batch 3*] & " " & [Enter Batch 4*]


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Hello.
I have a field with a critera like this....

Like [Enter Batch 1*] Or Like [Enter Batch 2*] Or Like [Enter Batch 3*] Or
Like [Enter Batch 4*]

what i need to do is create a variable to display on a report combining
those 4 inputs. i cant seem to get anything in my limited knowledge to work
=]

Thanks in advance for any help..

Leslie
 
J

John Spencer

A report will treat a query parameter as if it were another field. It doesn't
show up in the list of fields, but it can be referred to.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
so if im understanding it right...

anything i use in the [ xyz ] to ask for an input becomes a variable named [
xyz ]?
and is this global as long as the query is active?

John Spencer said:
You should be able to use the following as the source for a control in the report.

Control Source: = [Enter Batch 1*] & " " & [Enter Batch 2*] & " " & [Enter
Batch 3*] & " " & [Enter Batch 4*]


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Hello.
I have a field with a critera like this....

Like [Enter Batch 1*] Or Like [Enter Batch 2*] Or Like [Enter Batch 3*] Or
Like [Enter Batch 4*]

what i need to do is create a variable to display on a report combining
those 4 inputs. i cant seem to get anything in my limited knowledge to work
=]

Thanks in advance for any help..

Leslie
 
L

Leslie Porter OHV

AHHH!!... ok now im seeing... Thanks.

i used Karls original code he replied to me with but it was stumping me why
it only asked for the info once. i figured it would ask me a bunch of times
since i have the same [ xyz ] inputs in 2 places but it only asked once and
used the info in both places. so im my insance i was expecting 8 inputs but i
only got 4.

John Spencer said:
A report will treat a query parameter as if it were another field. It doesn't
show up in the list of fields, but it can be referred to.

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
so if im understanding it right...

anything i use in the [ xyz ] to ask for an input becomes a variable named [
xyz ]?
and is this global as long as the query is active?

John Spencer said:
You should be able to use the following as the source for a control in the report.

Control Source: = [Enter Batch 1*] & " " & [Enter Batch 2*] & " " & [Enter
Batch 3*] & " " & [Enter Batch 4*]


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County

Leslie Porter OHV wrote:
Hello.
I have a field with a critera like this....

Like [Enter Batch 1*] Or Like [Enter Batch 2*] Or Like [Enter Batch 3*] Or
Like [Enter Batch 4*]

what i need to do is create a variable to display on a report combining
those 4 inputs. i cant seem to get anything in my limited knowledge to work
=]

Thanks in advance for any help..

Leslie
 
Top