B
bond007taz
I am not sure if i am going the correct route, but I have a form that
creates a text string based upon what the user selects so that it
opens a report. The issue is that I have 4 checkboxes in the table
that the report is reporting on and I need to be able to allow the
user to select a combination of the checkboxes so that the report
shows all records that have those combination of checkboxes.
I have this string that works and it passes the needed values to a
report, this works fine:
[GFY]=8AND[BUSINESS_UNIT]='FEDEX'AND[ACCTs]='01AA'AND[CHECKBOX1]=-1
the string above works just fine and it shows all the records that
meet the above criteria AND if checkbox 1 is checked.
Ok, so if the user selects CHECKBOX2 then the string changes to:
[GFY]=8AND[BUSINESS_UNIT]='FEDEX'AND[ACCTs]='01AA'AND[CHECKBOX1]=-1AND[CHECKBOX2]=-1
The problem with above string is that is shows only the records that
have checkbox1 and checkbox2 selected but I want it to show all the
records that may only have checkbox1 selected but not checkbox2 AND
show all the records that may have checkbox2 selected but not
checkbox1 - make sense? I thought an "OR" statement would work but
apparently not.
so I tried creating an OR statement that looks like this:
[GFY]=8AND[BUSINESS_UNIT]='FEDEX'AND[ACCTs]='01AA'AND[CHECKBOX1]=-1OR[CHECKBOX2]=-1
The issue with the above string is that it shows all the records up to
the OR command then shows all the records that have checkbox2 selected
but it no longer takes into account the first few fields, like GFY,
BUSINESS_UNIT and ACCTs
I then tried to create a statement like the one below:
[GFY]=8AND[BUSINESS_UNIT]='FEDEX'AND[ACCTs]='01AA'AND[CHECKBOX1]=-1AND[GFY]=8AND[BUSINESS_UNIT]='FEDEX'AND[ACCTs]='01AA'AND[CHECKBOX2]=-1
notice the above string is the same string put together with AND but
one has CHECKBOX1 and the 2nd has CHECKBOX2 but this string errors out
and does not work. I tried putting in "(" at the beginning and ")" at
the end with no sucess.
argh, the end seems so close!!!
Is it possible to do what I want?
If so, what am I missing?
creates a text string based upon what the user selects so that it
opens a report. The issue is that I have 4 checkboxes in the table
that the report is reporting on and I need to be able to allow the
user to select a combination of the checkboxes so that the report
shows all records that have those combination of checkboxes.
I have this string that works and it passes the needed values to a
report, this works fine:
[GFY]=8AND[BUSINESS_UNIT]='FEDEX'AND[ACCTs]='01AA'AND[CHECKBOX1]=-1
the string above works just fine and it shows all the records that
meet the above criteria AND if checkbox 1 is checked.
Ok, so if the user selects CHECKBOX2 then the string changes to:
[GFY]=8AND[BUSINESS_UNIT]='FEDEX'AND[ACCTs]='01AA'AND[CHECKBOX1]=-1AND[CHECKBOX2]=-1
The problem with above string is that is shows only the records that
have checkbox1 and checkbox2 selected but I want it to show all the
records that may only have checkbox1 selected but not checkbox2 AND
show all the records that may have checkbox2 selected but not
checkbox1 - make sense? I thought an "OR" statement would work but
apparently not.
so I tried creating an OR statement that looks like this:
[GFY]=8AND[BUSINESS_UNIT]='FEDEX'AND[ACCTs]='01AA'AND[CHECKBOX1]=-1OR[CHECKBOX2]=-1
The issue with the above string is that it shows all the records up to
the OR command then shows all the records that have checkbox2 selected
but it no longer takes into account the first few fields, like GFY,
BUSINESS_UNIT and ACCTs
I then tried to create a statement like the one below:
[GFY]=8AND[BUSINESS_UNIT]='FEDEX'AND[ACCTs]='01AA'AND[CHECKBOX1]=-1AND[GFY]=8AND[BUSINESS_UNIT]='FEDEX'AND[ACCTs]='01AA'AND[CHECKBOX2]=-1
notice the above string is the same string put together with AND but
one has CHECKBOX1 and the 2nd has CHECKBOX2 but this string errors out
and does not work. I tried putting in "(" at the beginning and ")" at
the end with no sucess.
argh, the end seems so close!!!
Is it possible to do what I want?
If so, what am I missing?