date conversion fails 2

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)?
 

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

Similar Threads


Top