?
Solved

IIf query syntax in Make table query

Posted on 2013-02-03
2
Medium Priority
?
298 Views
Last Modified: 2013-02-03
I am getting a error with the following make table query,

BaseCost: IIf([Weight]<100,[Cost]),IIf([Weight]>100,[Cost]*[Weight])

Error: "contains invalid syntax or you need to enclose your text data in quotes"

If i try the first part only it works, BaseCost: IIf([Weight]<100,[Cost])
0
Comment
Question by:ExpressMan1
2 Comments
 
LVL 35

Accepted Solution

by:
Norie earned 2000 total points
ID: 38849632
You have an unneeded  ) after [Cost].

I don't think the 2nd IIf is needed, so try this.

BaseCost: IIf([Weight]<100,[Cost],[Cost]*[Weight])
0
 

Author Closing Comment

by:ExpressMan1
ID: 38849698
Perfect. Thank You imnorie.
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question