Having problem with DateSerial function

I am getting an error with the DateSerial Function.  I'm using the tabular query builder in MS Access.  When I press RETURN in the field row, I get this:  The expression you entered has a function containing the wrong number of arguments.  Here is the text of my function:

CompMonth: DateSerial(YEAR(Date([Comp date])),MONTH(Date([Comp date])),1)

I marked this high priority because today is the last day my college programmer is with us.  I'm trying to validate a page in the database dashboard by aggregating data to confirm that what I'm seeing is correct.  If we have an error, we must fix today.

Ann ScharpfAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.


pls try
CompMonth: DateSerial(Year([Comp date]);Month([Comp date]);1)

Open in new window

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
what about this?

CompMonth: DateSerial(YEAR([Compdate]),MONTH([Comp date]),1)
Corected delimiter
CompMonth: DateSerial(Year([Comp date]),Month([Comp date]),1)

Open in new window


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
Ann ScharpfAuthor Commented:
Thanks, that worked!  At first I couldn't see how  your expression was different than mine but now I see I had doubled the parentheses.  It worked now.  Very helpful.
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
well, you should select the first which provide the exact answer
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

From novice to tech pro — start learning today.