where to deine destination field in a query built by expression builder

  • Thread starter Thread starter John James
  • Start date Start date
J

John James

I get the error 3066 "Query must have at least one destination field" when
i try to run the below query which shoul display a combo box from a database
and use the selection as the first parameter value. What have I missed out
here. Thanks for your help.

The text that i am using is :

iif(isnull(Forms![FormName]![cboName],'*',Forms![FormName]![cboName])
 
A query must start with something like SELECT, UPDATE, or INSERT.

i.e. Select * from table

You're example is not a query, it's more of an expression. If you are
trying to use this expression as a control source, then you need to put the
equal sign(=) in front of it.

={expression}


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
You are missing a closing parentheses in this expression.

iif(isnull(Forms![FormName]![cboName]),'*',Forms![FormName]![cboName])

You could actually shorten this particular expression to

NZ(Forms!FormName!cboName,"*")
 
Back
Top