Calculated Fields Error

Romio68

Registered User.
Local time
Today, 18:08
Joined
Sep 4, 2013
Messages
27
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 ?
 
extend the names "Age" and "Gender" with their respective tablenames.

something like
[Table1].[Age] and [Table1].[Gender]

HTH:D
 
Age and gender are localy calculated fields, not part of a table.
Age: Formula based on table cells
Gender: ...
that is the problem
 
Close the query and create a new query based on the first.
I assume you want to do everything in the same query?

HTH:D
 

Users who are viewing this thread

Back
Top Bottom