M
Michael Reb
Hi,
I faced an abnormal behavior with Access 2002, file format 2000,
SetOption:ANSI Query Mode and ADODB-Library 2.1 or 2.8 referenced.
There is no reference to DAO.
Here´s the line of code where the error rises (sometimes...) . It´s inside a
Public Function:
fktGetIMEXSpecNameForMaxSpecID = Nz(DLookup("SpecName", "MSysIMEXSpecs",
"SpecID = " & Nz(DMax("SpecID", "MSysIMEXSpecs", "SpecName Like 'DAFILE%
Importspezifikation %'"), -99)), "")
This function is invoked by several queries after DB-start working well.
Then it is invoked by the following line:
DoCmd.TransferText acImportDelim, fktGetIMEXSpecNameForMaxSpecID(),
"tmpImportDAFile", gComDlgFileName, False
fktGetIMEXSpecNameForMaxSpecID() was still working correct within the above
DoCmd.TransferText... line.
BUT after execution of this line it starts expecting the wildcards to be "*"
instead of "%" !!!
Queries based on the above function don´t work anymore either. Changing code
from "%" to "*" and the queries will show results as expected.
I need to close & open the DB again to get the correct behavior - until
DoCmd.TransferText is executed.
I performed some additional tests without success for example having
TransferText work in create or insert mode.
The desribed behavior also occurs if there will be an error during execution
or not.
Also same result with replacing "fktGetIMEXSpecNameForMaxSpecID()" by the
string itself within the TransferText-Line
Any idea why Wildcard requirements are switching back from ANSI to JET
convention and how to avoid/correct this during runtime ?
I´d prefer not to substitute the DomFunctions or Functions by Parameter/Sub
Queries.
Thanks
Michael
I faced an abnormal behavior with Access 2002, file format 2000,
SetOption:ANSI Query Mode and ADODB-Library 2.1 or 2.8 referenced.
There is no reference to DAO.
Here´s the line of code where the error rises (sometimes...) . It´s inside a
Public Function:
fktGetIMEXSpecNameForMaxSpecID = Nz(DLookup("SpecName", "MSysIMEXSpecs",
"SpecID = " & Nz(DMax("SpecID", "MSysIMEXSpecs", "SpecName Like 'DAFILE%
Importspezifikation %'"), -99)), "")
This function is invoked by several queries after DB-start working well.
Then it is invoked by the following line:
DoCmd.TransferText acImportDelim, fktGetIMEXSpecNameForMaxSpecID(),
"tmpImportDAFile", gComDlgFileName, False
fktGetIMEXSpecNameForMaxSpecID() was still working correct within the above
DoCmd.TransferText... line.
BUT after execution of this line it starts expecting the wildcards to be "*"
instead of "%" !!!
Queries based on the above function don´t work anymore either. Changing code
from "%" to "*" and the queries will show results as expected.
I need to close & open the DB again to get the correct behavior - until
DoCmd.TransferText is executed.
I performed some additional tests without success for example having
TransferText work in create or insert mode.
The desribed behavior also occurs if there will be an error during execution
or not.
Also same result with replacing "fktGetIMEXSpecNameForMaxSpecID()" by the
string itself within the TransferText-Line
Any idea why Wildcard requirements are switching back from ANSI to JET
convention and how to avoid/correct this during runtime ?
I´d prefer not to substitute the DomFunctions or Functions by Parameter/Sub
Queries.
Thanks
Michael