Date, DateAdd, with runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm developing an access application using XP version.
I have a listbox on a form with a row source of a query that calculates
dates using dateadd function.
This query wont return results for some computers and for others it's ok.
All computers are linked to an SQL server using ODBC connection. This query
doesn't work on an winXP station with access 2003, and not on WinNT with
Access XP runtime.

Any ideas ?
 
What do you mean "won't return results"? Does it throw an error, or what?

Please post the SQL of the query, in case you have some Windows locale
problem.
 
I mean the listbox is empty - even no headlines row - which means an error,
it doesn't throw any error.

The SQL syntax is something like:

Select * From tbl_tmp where dateadd("d", -20, tbl_tmp.arrivedate) >Date()

I think the problem lies in the relations between VB functions and JET SQL
functions that are not working well.

It works on my computer and a few others - with different OS's (98, XP,
NT), all with XP runtime
 
Daniel said:
I mean the listbox is empty - even no headlines row - which means an error,
it doesn't throw any error.

The SQL syntax is something like:

Select * From tbl_tmp where dateadd("d", -20, tbl_tmp.arrivedate) >Date()

Almost certainly you have missing/broken references on those machines. The most
common symptom of that is failure of the Date() function. See Allen's page at
link below.

http://allenbrowne.com/ser-38.html
 
Back
Top