Date format problem on update table

Kallu

Registered User.
Local time
Yesterday, 16:59
Joined
Nov 4, 2011
Messages
18
Hi there:
I have inventory database.
The problem is on date. If I register new data, expired date on tblInventry, is ok, but if I update tblInventory with new data (Amount, or I change expired date, or i left same date), on tblInventory expired dates changes to time (30/12/1899, if click on table format is 00:00:01.
I tried all date formats, on tables, on forms, on vba, but no luck.
I attached sample database with this problem.

If someone can help me about this problem, I will be very grateful.


Best regards.
 

Attachments

Last edited:
Remove the input mask 00-00-00;0;_ you've it both on the form and at the table level.
 
I already remove input mask, on form, tables, also a try removing date format on vba, but no results.
 
Yes I see, you've another problem:
Replace what you've with the below line:
Code:
    stringSQL = "UPDATE tblInventory SET [Afati]=#" & Format(Afati, "mm/dd/yy") & "# WHERE BarCode='" & Me.ID & "'"
Database attached:
 

Attachments

Thank You very much, JHB. That code is work.
Thanks again.
 
You're welcome, good luck. :)
 

Users who are viewing this thread

Back
Top Bottom