format dates in access 2007

A

azgeorge

I would like to be able to enter dd/mmm/yyyy or have the option to just show
yyyy in a field. Is this possible and if so, how would I do this? Currently
I can use the dd/mmm/yyyy, however, it will not allow me to just use the year.
 
D

Doug Steele

When you say "just show yyyy in a field", do you really mean "just enter yyyy
in a field"? If so, the answer's no: a date must be a complete date.
 
K

KARL DEWEY

One way is to format the date field text box for year and create another text
box. Overlay second text box and set the background property to transparent.
Create a macro with two SetValue actions.
First sets the date field with --
DateSerial([Forms]![YourFormName]![SecondTextBox],1,1)
Second sets second text box --
Null

Set AfterUpdate property of second text box to call the macro.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top