help please, I have problement with access

  • Thread starter Thread starter Ricardo saul
  • Start date Start date
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
 
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top