issue with dates (1 Viewer)

arm1

Registered User.
Local time
Today, 16:30
Joined
Nov 21, 2006
Messages
40
I have a form with unbound fields.

One of the fields is a date that the user must enter.

I ask the user to enter it as mm-dd-yyyy, but because the field is a medium date then obviously if the user enters 02-12-2009 the system converts this and puts 12-Feb-09 into the field.

The issue seems to occur when I grab all these fields, and use an sql string and run the DoCmd.runSQL <string>.

I put the form field values into the table, and the date field format for the table is ALSO medium date.

It seems that it is not properly transferring the form data to the table, for most date transfers result in a record entry default of 30-Dec-1899.

It also seems that ONLY these dates have a time-stamp attached (the ones that have been properly entered into the table do NOT have this time stamp, just a correct date in medium format.

I am hoping someone knows exactly why it mis-transfers the date value entered by the user... and how best to resolve this issue!?!

Thank you for all you help,

- arm1
 
Last edited:

SOS

Registered Lunatic
Local time
Today, 13:30
Joined
Aug 27, 2008
Messages
3,514
Best way to resolve this issue in my mind is to have them use a calendar to browse to the date.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:30
Joined
Sep 12, 2006
Messages
15,719
you must be getting the sql statement incorrect

try msgbox strsql to see EXACTLY what you have
 

Users who are viewing this thread

Top Bottom