Results 1 to 2 of 2
Thread: Month/year date (XP)
2004-04-08, 01:47 #1
- Join Date
- Jan 2001
- Virginia, USA
- Thanked 1 Time in 1 Post
Month/year date (XP)
I've studied several posts that deal with date formatting. Maybe I haven't read the right post, but so far I'm just confused.
What I need is a date field where the user keys in just the month and year, as in 8/03 (August 2003). How can I set this up? Do I necessarily have to set up the field in the table this way, or just format the field in the form and/or report or the query? I'm dealing with employee assessment (evaluation) dates, which run from, say, August 2002 to August 2004. There isn't a specific date
2004-04-08, 06:30 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Month/year date (XP)
The problem with the 8/03 format is that Access (or rather Windows) will interpret it as m/dd in the current year, i.e. as 8/03/04 or August 3, 2004.
Way to get around this:
- Let the user enter the date as 8/2003 or as Aug 2003. This is risky, if the use forgets to enter the complete year, the date will be incorrect.
- Let the user enter the date in an unbound text box; use the After Update event of this text box to populate the date field. You would need to do extensive error checking.
- Provide a combo box from which the user can select a valid month/year. You would have to create a table containing all valid month/year combinations.
- Use separate fields for month and year. You can use combo boxes to let the user select a valid year and month.
The third and fourth options are probably the easiest to implement.