By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,337 Members | 2,084 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,337 IT Pros & Developers. It's quick & easy.

Date Function on a Form

P: 46
Hello,

I have a text box on a form that I'd like to reflect the 15th day of the month and year as selected in a combo box. For instance, if the combo box (call it "cmbdate") is 9/1/2008, I'd like the text box to show 9/15/2008.

I've put the following in the text box: =date(15,month([Forms]![Form1]![cmbdate]),year([Forms]![Form1]![cmbdate]))

I am getting an error that my function contains the wrong number of arguments. I'd imagine this is a syntax issue. Can anyone help?

Thanks,

Brian
Sep 2 '08 #1
Share this Question
Share on Google+
3 Replies


FishVal
Expert 2.5K+
P: 2,653
Hello, Brian.

It is a task for DateSerial() function. Date() function does nothing but return current date.

Regards,
Fish
Sep 2 '08 #2

NeoPa
Expert Mod 15k+
P: 31,494
Try :
Expand|Select|Wrap|Line Numbers
  1. =CDate('15 ' & Format([Forms]![Form1]![cmbdate],'mmmm yyyy'))
Sep 2 '08 #3

P: 46
Thank you for your reply. Dateserial works well.
Sep 2 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.