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?
Rgonzo1971Connect With a Mentor Commented:
Corected delimiter
CompMonth: DateSerial(Year([Comp date]),Month([Comp date]),1)

Open in new window


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

Open in new window

Ryan ChongCommented:
what about this?

CompMonth: DateSerial(YEAR([Compdate]),MONTH([Comp date]),1)
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 ChongCommented:
well, you should select the first which provide the exact answer
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.

All Courses

From novice to tech pro — start learning today.