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

Date field on form changes format when it receives focus

Status
Not open for further replies.

src2

Technical User
Mar 1, 2001
72
US
I'm using access2000. I have a form frmPayBills with a date field DatePaid and when you click on the field to change the date the format changes. How can I correct this? The forms record source is:

SELECT [tblBillDetails].[BillDetailsID], [tblBillDetails].[BillID], [tblBillDetails].[DatePaid], [tblBillDetails].[AmountPaid], [tblBillDetails].[PaymentMethod] FROM tblBillDetails;

DatePaid in tblBillDetails is setup as a date field with the format mm/dd/yy. The input mask is set to 99/99/00;;_

When the form frmPayBills is opened it shows up as mm/dd/yy which is correct but as soon as I click in the field to change the date the format is changed to long format. If I remove the time and leave nothing but mm/dd/yy it accepts the change. If I leave even a space it gives me an error.

What am I missing??

Thanks
 
Have you checked the input mask on the control?
It may be different.

Personally, I avoid setting the mask in the table and set them only on the controls. Masks are really a presentation layer thing anyway.

-Ken
 
Thanks for your response. I checked the control and it was the same. On your advice I removed the mask in the table and had the same result. Any ideas?

Thanks
 
You might also want to check the Format for the control on the form. Make sure it matches the input mask. For example, you don't want a Format of "Long Date" with an input mask of "mm/dd/yy.
 
This is driving me nuts!! I went back and removed the input mask for the control DatePaid on frmPayBill, checked to be sure the format was set to short format, checked the table tblBillDetails for field DatePaid to be sure the format was set to short format, checked to be sure the input mask was blank as well. When I go back in and click on the control DatePaid on fmrPayBill it changes to a date and time format. I even compacted the database.

Help!!!!

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top