Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

this expression is typed incorrectly, or it is too complex to be evalu

Status
Not open for further replies.

brwnsuga21

Technical User
Aug 23, 2007
15
US
I am new to this forum and need help. I have three fields/ combo boxes that are dependant on each other. The first combox controls the info that is displayed in the second. The Second controls the info displayed in the third. When I change the third combo box to a list box, i get this error when clicking on the query or opening the form "This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."

My query statement reads as follows:

IIf(IsNull([Forms]![frmSurveyData]![OfficeName]),"[LocationID]",[Forms]![frmSurveyData]![OfficeName])

I dont know where to begin to correct the error. Please help.
 



Hi,

try...
[tt]
IIf([Forms]![frmSurveyData]![OfficeName]='',[LocationID],[Forms]![frmSurveyData]![OfficeName])
[/tt]


Skip,

[glasses] When a wee mystic is on the loose..
It's a Small Medium at Large! [tongue]
 
I tried it and now I am getting this message "The specified field '[LocationID]' could refer to more than one table listed in the FROM clause of your SQL statement."

What should I do next?
 
Prefix the LocationID field with the name of the table you want it to come from, e.g.

TableA.LocationID



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top