Syntax for querry

I am trying to do a sumif formula that isn't working. If the value of the Office is "949 S. Orange County" I want it to sum the data. I am using the below syntax. When I run the querry it asks me to Enter Parameter Value for Office.Customer Info Table. If I type in "949 S. Orange County" then it works properly I'd like to to look for it without asking me to enter it. Any ideas?

Sum(IIf([Office].[Customer Info Table]="949 S. Orange County",[ExtendedPrice],0)) AS [949 Office]
cansevinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cansevinAuthor Commented:
It actually doesn't work when I type the text in. Not sure what's going on! Please help!
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
What is the actual name of the Table (or Query) and the Field in the Table (or Query) ?

Maybe you should try 909 W. San Bernardino County :-)
0
cansevinAuthor Commented:
The table name is Customer Info Table
The Field name is Office

In that field there are values that read "949 S. Orange County" I want it to sum those values. Thanks!
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

IrogSintaCommented:
Are you certain that the field [Customer Info Table] exists in the Office table?  Be sure to verify the field is spelled the same way.

Ron
0
IrogSintaCommented:
Oh so you have it in reverse.  It should be:
Sum(IIf([Customer Info Table].[Office]="949 S. Orange County",[ExtendedPrice],0)) AS [949 Office]

Ron
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cansevinAuthor Commented:
Yes... it is there. Here is the entire syntax:
SELECT Format([Bookings.DateRecorded],"ww") AS Week, Sum(IIf(Year([Bookings.DateRecorded])=2014,[ExtendedPrice],0)) AS [2014 Rev], Sum([Booking Details Extended].ExtendedPrice) AS SumOfExtendedPrice, [Customer Info Table].Office, Sum(IIf([Office].[Customer Info Table]="949 S. Orange County",[ExtendedPrice],0)) AS [949 Office]
FROM [Customer Info Table] INNER JOIN ([Booking Details Extended] INNER JOIN Bookings ON [Booking Details Extended].BookNumber = Bookings.BookNumber) ON ([Booking Details Extended].CustomerID = [Customer Info Table].CustomerID) AND ([Customer Info Table].CustomerID = Bookings.CustomerID)
WHERE (((Bookings.DateRecorded) Between #1/1/2014# And #12/31/2014#))
GROUP BY Format([Bookings.DateRecorded],"ww"), [Customer Info Table].Office;
0
cansevinAuthor Commented:
Thanks! Sorry MX... but good to see you are local! You do a great job on this!
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
It appeared you had it backwards.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.