Invalid Expression

P

Paul Hammond

I have inserted the following formula in my query

Monday:
IIf([Forms]![frmServiceReport]![cboReportType]=1,[Mon_Cpt],[Mon_Cpt]-[Mon])

I get a "MS Jet DB Engine does not recognize
[Forms]![frmServiceReport]![cboReportType] as a valid field name or
expression."

I used the formula wizard to build this. Any ideas on what is causing this?

Thanks,

Paul
 
J

Jerry Whittle

1. Is the form open when you run the query?

2. If [Forms]![frmServiceReport]![cboReportType] is a combo box, and judging
by your naming convention it is, you may need to use the Column property of
the combo box to pick out exactly which field is used.
 
P

Paul Hammond

1. Yes, the form is open

2. It is a combo box, but I am trying to read the bound column. I didn't
think I needed a column reference in that case.

Paul

--
Can't we all just get along?


Jerry Whittle said:
1. Is the form open when you run the query?

2. If [Forms]![frmServiceReport]![cboReportType] is a combo box, and judging
by your naming convention it is, you may need to use the Column property of
the combo box to pick out exactly which field is used.
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Paul Hammond said:
I have inserted the following formula in my query

Monday:
IIf([Forms]![frmServiceReport]![cboReportType]=1,[Mon_Cpt],[Mon_Cpt]-[Mon])

I get a "MS Jet DB Engine does not recognize
[Forms]![frmServiceReport]![cboReportType] as a valid field name or
expression."

I used the formula wizard to build this. Any ideas on what is causing this?

Thanks,

Paul
 
Top