Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding datepart function to form control source?

Status
Not open for further replies.

pnasrallah

Technical User
Feb 6, 2003
7
US
I need to use the datepart function in a form. The control source is [reportdate] and I need it to return just mm/yyyy. I'm new at this and can't quite figure out where to go.
 
Hi,

In the 'ControlSource' property of the textbox where you want this part-date format insert this:

=DatePart("mmyyyy",[ReportDate])

Hope this helps,

Regards,

Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience." darrylles@totalise.co.uk
 
I did as suggested but the form just shows '#error'. Do I need to change something in the query?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top