How? Default is current date, but user can edit if needed?

G

Guest

I want Start Date field to default to the current date, but allow the user to
change it if needed. Start Date field has a format of Short Date with a mask
__/__/__. The boss wants the field to default to the current date to
eliminate keystrokes for the user.

Scenario: User forgot to input data yesterday that must reflect yesterday's
date.

How can the field be formatted to allow the user to change the Start Date
field if the field defaults to current date?
 
G

Guest

At the table design, put in Date() for the default value for the field. This
will put in the current date for NEW records. It will not change existing
records. A user can change the date when they create the record or edit it at
a later time.

A common problem is when the default value, formatting, and input masks
aren't all the same. For example the formatting calls for a 4-digit year but
the input mask only accepts 2. Make sure that they are all the same or Access
will complain.

Also don't use the Short Date format as it can either be 2 or 4-character
years depending on a particular computer's regional settings. It might not
work with your input masks. Consider using the following:

Format: mm/dd/yy
Input Mask: 99/99/00;0;_
 
J

Joan Wild

As others have pointed out, use the Date() function to default to today's date. I would not use an input mask on a date, especially since your boss wants to save keystrokes. An input mask can slow the user down more than help at times.

Depending on your computer's Regional Settings, you can enter 6/4 for today's date, and Access will assume the current year. Because 6/4 could be interpreted as June 4 or April 6 (again depending on Regional Settings), it is important to provide an unambiguous format on the textbox so that the user knows whether their entry has been interpreted as intended. Use a format of
dd/mmm/yyyy or mmm/dd/yyyy
 

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

Top