MS Query and Navision

First, I tried to seach here but I cannot find a clear answer to my question below. I have Navision 3.10A which I would like to access from Excel using MS Query. I tried a simple filter and it works perfectly. The sample SQL statement produced by MS Query is as follows: SELECT “G/L Account”.No_, “G/L Account”.Name, “G/L Account”.“Net Change” FROM “G/L Account” “G/L Account” WHERE (“G/L Account”.No_=‘2910’) AND (“G/L Account”.“Date Filter”=‘2001-01-19’) The above statement works, but when I come to date ranges, I cannot retrieve the correct data. Both the two queries below doesnt work. SELECT “G/L Account”.No_, “G/L Account”.Name, “G/L Account”.“Net Change” FROM “G/L Account” “G/L Account” WHERE (“G/L Account”.No_=‘2910’) AND (“G/L Account”.“Date Filter”>=‘2001-01-01’) AND (“G/L Account”.“Date Filter”<=‘2001-01-31’) SELECT “G/L Account”.No_, “G/L Account”.Name, “G/L Account”.“Net Change” FROM “G/L Account” “G/L Account” WHERE (“G/L Account”.No_=‘2910’) AND (“G/L Account”.“Date Filter” Between ‘2001-01-01’ And ‘2001-01-31’) Anyone who can give me an advise here.

I had this same problem. I had to use all dates >= and then remove the dates I didn’t want at the end of the range in a second step in MS Access. I tried >=#date#<#date# and the “between” criteria and it had an ODBC call error each time so I gave up.

You need to use ‘ancient’ obdb syntax: = { d ‘2001-01-01’} yyyy-mm-dd DjangMan

I tried what you suggested but I experienced some errors. I tried setting the query below but I think MS Query cannot recognized the command. Could you be more specific. SELECT “G/L Account”.No_, “G/L Account”.Name, “G/L Account”.“Net Change” FROM “G/L Account” “G/L Account” WHERE (“G/L Account”.No_=‘2910’) AND (“G/L Account”.“Date Filter”>={ d ‘2001-01-01’}) AND (“G/L Account”.“Date Filter”<={ d ‘2001-01-31’}) Thank you very much.