C
CAFRman
I have a compiled Access 2000 application (converted to 2007) that seems to
have some code that runs perfectly fine in full access but will not run in
the 2007 runtime. Even when I execute the .accdr on a machine that has the
full access on it it runs fine but when i take the .accdr to a machine that
only has the 2007 runtime installed it will not run. I have been able to
isolate it to the following code.
sSql = "SELECT DISTINCT Mid([acct-char].[acct-nr]," & giFundStartPos
& "," & giFundLength & ") AS FundNbr, Characteristics.description as
FundName, Characteristics.position into tblFundName" & vbCr
sSql = sSql & "FROM Characteristics INNER JOIN [acct-char] ON
(Characteristics.abbrev = [acct-char].abbrev) AND (Characteristics.position =
[acct-char].position)" & vbCr
sSql = sSql & "WHERE Characteristics.position=2"
Set rstemp = dbMine.OpenRecordset(sSql, dbOpenSnapshot)
The execution actually seems to fail on the OpenRecordset. The error that
comes up is the following:
"The expression On Click you entered as the event property setting produced
the following error:
*The expression may not result in the name of a macr, the name of a
user-defined function, or [Event procedure]
Is this a bug or am i missing something?
have some code that runs perfectly fine in full access but will not run in
the 2007 runtime. Even when I execute the .accdr on a machine that has the
full access on it it runs fine but when i take the .accdr to a machine that
only has the 2007 runtime installed it will not run. I have been able to
isolate it to the following code.
sSql = "SELECT DISTINCT Mid([acct-char].[acct-nr]," & giFundStartPos
& "," & giFundLength & ") AS FundNbr, Characteristics.description as
FundName, Characteristics.position into tblFundName" & vbCr
sSql = sSql & "FROM Characteristics INNER JOIN [acct-char] ON
(Characteristics.abbrev = [acct-char].abbrev) AND (Characteristics.position =
[acct-char].position)" & vbCr
sSql = sSql & "WHERE Characteristics.position=2"
Set rstemp = dbMine.OpenRecordset(sSql, dbOpenSnapshot)
The execution actually seems to fail on the OpenRecordset. The error that
comes up is the following:
"The expression On Click you entered as the event property setting produced
the following error:
*The expression may not result in the name of a macr, the name of a
user-defined function, or [Event procedure]
Is this a bug or am i missing something?