I have the following:
A form containing a textbox [OrgIn] that takes values "", "OS ", "OF ", "OT " based on a combobox
A query containing various fields from tables and calculated fieelds too.
Query calculated Field: Age: ....
Query calculated Field: Gender: ...
Age and gender are not table fields, but caculated fields based on table values.
The last calculated field, named Org, will create a string for each record, like "OS OT " or "OS OF ", based on the fields Age and Gender, using the formula :
Org: IIf([Age]<36,"OT ","") & IIf([Gender]=2,"OF ","") & IIf(([Gender]=1 And [Age]>64) Or ([Gender]=2 And [Age]>61),"OS ","")
Now the weird thing:
the query works fine and it fills all Org values as it should, but when I try to put a criteria on the Org field (Like "*"&[Forms]![MyForm]![OrgIn]&"*"), the query starts to fail and is asking for Age and Gender parameters.
How should I fix this ?
A form containing a textbox [OrgIn] that takes values "", "OS ", "OF ", "OT " based on a combobox
A query containing various fields from tables and calculated fieelds too.
Query calculated Field: Age: ....
Query calculated Field: Gender: ...
Age and gender are not table fields, but caculated fields based on table values.
The last calculated field, named Org, will create a string for each record, like "OS OT " or "OS OF ", based on the fields Age and Gender, using the formula :
Org: IIf([Age]<36,"OT ","") & IIf([Gender]=2,"OF ","") & IIf(([Gender]=1 And [Age]>64) Or ([Gender]=2 And [Age]>61),"OS ","")
Now the weird thing:
the query works fine and it fills all Org values as it should, but when I try to put a criteria on the Org field (Like "*"&[Forms]![MyForm]![OrgIn]&"*"), the query starts to fail and is asking for Age and Gender parameters.
How should I fix this ?