rtdc
Registered User.
- Local time
- Today, 17:13
- Joined
- Feb 27, 2007
- Messages
- 55
I got a problem with a date field, in the table it is fine showing ‘04/10/2007’ and the form the same but when I call this field from my code I get ‘30/12/1899’ I’ve looked through the forum and tried the suggestions found and no good.
The table field settings are
Format = Short Date
Required = No
Indexed = No
All others blank.
The code I am using
Dim MANSODTE As Object
Set rs = CurrentDb.OpenRecordset("SELECT * FROM [TempExport]")
Set MANSODTE = rs![EngSignoffDate]
wb_obj.Worksheets(1).Cells((RSB + 10), 1).Value = MANSODTE
This gives me ‘31/12/1899’
If I set it to MANSODTE As Date I get 12:00 AM I have tried the format command which took me back to 1899.
This is really holding me up anyone got an idea?
Cheers.
The table field settings are
Format = Short Date
Required = No
Indexed = No
All others blank.
The code I am using
Dim MANSODTE As Object
Set rs = CurrentDb.OpenRecordset("SELECT * FROM [TempExport]")
Set MANSODTE = rs![EngSignoffDate]
wb_obj.Worksheets(1).Cells((RSB + 10), 1).Value = MANSODTE
This gives me ‘31/12/1899’
If I set it to MANSODTE As Date I get 12:00 AM I have tried the format command which took me back to 1899.
This is really holding me up anyone got an idea?
Cheers.
