date conversion fails 2

  • Thread starter Thread starter nick
  • Start date Start date
N

nick

Sorry about the repost but I forgot to tell what error was:

I have distributed an application that works fine on most clients. But on
two clients I get an error in a specific function:

The error is:
"The conversion of a char data type to a datetime data type resulted in an
out-of-range datetime value"

This is where things go wrong:
strSQL = "SELECT MyDate FROM tblHolidays WHERE MyDate BETWEEN '" &
Format(Me.txtDateFrom, "MM/DD/YYYY") & "' AND '" & Format(Me.txtDateTo,
"MM/DD/YYYY") & "'"
Set rst = CurrentProject.Connection.Execute(strSQL)

All clients should have same MDAC (2.8)

The txtDateFrom and txtDatoTo fields are both formattet as "short date" and
the client machines are set up with a dd-MM-yyyy short date format in
regional settings. The fields are locked.

Why does it only happen on 2 client machines and not all (or none)?
 
Back
Top