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

Inputmask 1

Status
Not open for further replies.

bobbster2000

Programmer
Sep 19, 2001
102
US
I have a field called "Due Date". Is there an input mask where access automatically fills in the year but leaves the day and month blank for the users to fill in?
 
i dont use an input mask cause it's too irritating. when you enter in a date it automatically puts in the year, say if you just type in 5/16 and hit enter, it will automatically put in 2001. if you need it to appear to have a two-digit month and year, then just format it to be "mm/dd/yy".
 
Its not working. Went to my table and formatted "Due date" to be "mm/dd/yy" and now I'm getting the literal value I put in the formate mm/dd/yy in my due date field automatically.
 
I took out the quoets and it allows me to fill in the Month and the Day. But when I get to the year, and press enter so access can automatically fill it in for me, I get a error message that says "The value you entered isn't vaild for this field".
 
That's what GingerR meant by the input mask being irritating, but you said you put that in the format? Is your field type set to date/time or is it text?
 
It's set to date/time. Is there any other way to do it then without using the inputmask?
 
Just forget the input mask altogether and let the user type anything into the field. Access will try to interpret what they type as a sensible date (adding current year by default). If Access cannot understand what the user typed then it will bring up the "invalid" message.

Just make sure the textbox is bound to a date/time data field. Maq B-)
<insert witty signature here>
 
Must point out that there is a difference between format and input mask. To get the behavior Bobbster described I had to set the Input Mask to &quot;mm/dd/yy&quot; with or without quotes. Ginger's suggestion to set the format worked exactly as described.
 
Thanks a lot everyone. I just did it like Maquis said and I'm getting the behavior I wanted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top