var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Storing a date
If the user enters 6/6/2004, how do I store that value as 06/06/2004?
I want the leading zeroes but, I don't want to require the user to put them in manually but, rather just add them automatically.
In the BeforeUpdate event of your date entry field:
Me.myDateEntryField = Format(Me.myDateEntryField, "dd/mm/yyyy")
The above Format statement is setup for a "day, month, year" date format. If you want a "month, day, year" format then use:
Me.myDateEntryField = Format(Me.myDateEntryField, "mm/dd/yyyy")
This line will modify the date entry before it is saved to table. Play with it...make it look the way you want.
I tried your suggestion but the following error came up:
Run-time error '-2147352567 (80020009)'
The macro or function set to the BeforeUpdate or Validation Rule property for this field is preventing Microsoft Access from saving the data in the field.
In my table design, I have the date format as "Short Date". When I type a date directly into the table with leading zeroes, they get stipped off.
just put mm/dd/yyyy into format section of your field.
Thanks. I wasn't aware you could do that.
yes you can. the dropdown options are stock options, you can do custom formatting with proper letters.