help please, I have problement with access

R

Ricardo saul

Hi partners: developers, I need your knowledge, I have a problem with the
dates of access, I send since VB6 to record a date & it does the following:

if I send a date were the day is lower then 13 the DB puts it on the place
of the month:

example: 10/12/2000

on the field it records the following

12/10/2000

but if the day is higher it doesn't do nothing
 
D

Dirk Goldgar

Ricardo saul said:
Hi partners: developers, I need your knowledge, I have a problem with
the dates of access, I send since VB6 to record a date & it does the
following:

if I send a date were the day is lower then 13 the DB puts it on the
place of the month:

example: 10/12/2000

on the field it records the following

12/10/2000

but if the day is higher it doesn't do nothing

If you are building and executing an SQL statement to store the date,
with a date literal embedded in the SQL string, you must format the date
in the US standard date format, or else an unambiguous format that can
be interpreted by Jet the database engine. I suggest that were before
you might have had something like this:

strSQL = _
"UPDATE SomeTable SET DateField = #" &Me.txtDateField & "#"

you change it to be like this:

strSQL = _
"UPDATE SomeTable SET DateField = #" & _
Format(Me.txtDateField, "mm/dd/yyyy") & "#"

Is that example clear enough?
 
Top