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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Format in table

Status
Not open for further replies.

Techdawgs

Programmer
Nov 12, 2004
14
US
I have a column in my table that just needs to show month and year. I have the format set up as mm/yy. I want to set it up that when you enter "7/7" (July/2007) it takes it as "07/07" and not "07/07/2005".
 
I would probably never do this since date entry in computer programs is date entry is date entry. However, you could create code in the after update event like:
Code:
Me.txtYourDate = DateSerial(2000+Day(Me.txtYourDate), Month(Me.txtYourDate),1)
Set the format of the text box to only display the month and year.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top