Changing currency criteria with a check box on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my query I have a BallanceDue field. I want to use a check box on a form
to tell my query to enter a criteria of <>0 in the field.

I have tried the following:

IIf([FORMS]![PrintHCFA].[Greater]=Yes,<>0,"")

This does not work. I have tried to enter quotes around my parameters and
it still does not work. I hope you can see my intent. I think the problem
is my trying to use IIf in a currency field. Suggestions will be greatly
appreciated.
 
Mybe there is a beter way, but you can try

WHERE ([FieldName]=0) Like IIf([FORMS]![PrintHCFA].[Greater]=True,False,"*")
 
Cravaus,

Add a new field to your query, [FORMS]![PrintHCFA].[Greater]

On the top criteria line for the new field, type True, and on the same line
for the BallanceDue field type <>0.
On the second criteria line for the new field, type False, and don't type
anything in the corresponding line for the BallanceDue field. That should do
what you want.

Since you don't need to display either of these fields, uncheck the Display
checkbox for both of them.

Hope this helps,

Sam
In my query I have a BallanceDue field. I want to use a check box on a form
to tell my query to enter a criteria of <>0 in the field.

I have tried the following:

IIf([FORMS]![PrintHCFA].[Greater]=Yes,<>0,"")

This does not work. I have tried to enter quotes around my parameters and
it still does not work. I hope you can see my intent. I think the problem
is my trying to use IIf in a currency field. Suggestions will be greatly
appreciated.
 
Thanks, that works. I don't know why mine will not but I do understand why
yours does.

Thanks again
cravaus

Ofer Cohen said:
Mybe there is a beter way, but you can try

WHERE ([FieldName]=0) Like IIf([FORMS]![PrintHCFA].[Greater]=True,False,"*")

--
Good Luck
BS"D


Cravaus said:
In my query I have a BallanceDue field. I want to use a check box on a form
to tell my query to enter a criteria of <>0 in the field.

I have tried the following:

IIf([FORMS]![PrintHCFA].[Greater]=Yes,<>0,"")

This does not work. I have tried to enter quotes around my parameters and
it still does not work. I hope you can see my intent. I think the problem
is my trying to use IIf in a currency field. Suggestions will be greatly
appreciated.
 
Back
Top