We have been using an Access front end (97) to use linked SQL 6.5 db. We recently upgraded to Access2K and SQL2K. Everything compiled correctly, after some mods. The code works fine when it is ran on a computer with Office 2K loaded. When wanted to create a runtime version, so we ran through the Package and Deployement wizard. In one of the modules we have some code based on dates. This is shown below.
s = "SELECT PatID FROM tblInvDetail WHERE ARInvID = 0 AND PatID IS NOT Null "
s = s & "AND FromDt >= #" & CStr(Forms!frmGlobalVars!StartDt) & "# "
s = s & "AND FromDt <= #" & CStr(Forms!frmGlobalVars!EndDt) & "# "
s = s & ";"
---FromDt is a DateTime in SQL db.
I get an error in the Runtime version. The only indication I get is that "MSACCESS.exe has generated an error and will be closed by Windows".
If I remove the # sign and replace with a single ', I don't get the error, but I don't get the data back either!
Any help would be appreciated.
s = "SELECT PatID FROM tblInvDetail WHERE ARInvID = 0 AND PatID IS NOT Null "
s = s & "AND FromDt >= #" & CStr(Forms!frmGlobalVars!StartDt) & "# "
s = s & "AND FromDt <= #" & CStr(Forms!frmGlobalVars!EndDt) & "# "
s = s & ";"
---FromDt is a DateTime in SQL db.
I get an error in the Runtime version. The only indication I get is that "MSACCESS.exe has generated an error and will be closed by Windows".
If I remove the # sign and replace with a single ', I don't get the error, but I don't get the data back either!
Any help would be appreciated.