G
Guest
I am having a very frustrating time trying to figure out why I am getting an
error message when using the Mid function. The error message says that my
database can’t find the field Mid referred to in my expression. Yet when I
copy and paste the same Mid statement line into the debug window it gives me
the correct results.
I tried a simple test sub such as:
Dim varTest as Variant
varTest = Mid(“abcdefghijâ€,2,6)
Debug.print varTest
It works fine when I have it in a standard module, and call it (using a
command button onclick event), but when I have it in my form's module and
call it (the same way & with the sub in the standard module removed) I get
the error message.
Is there a reference library I am missing? I don’t even know what they
are, but the ones I have checked are: Visual Basic for Appl., MS Acess 10.0,
OLE Automation, MS DAO 3.6, MS ActiveX Data Obj. 2.1, MS Office 10.0 Obj. Lib.
error message when using the Mid function. The error message says that my
database can’t find the field Mid referred to in my expression. Yet when I
copy and paste the same Mid statement line into the debug window it gives me
the correct results.
I tried a simple test sub such as:
Dim varTest as Variant
varTest = Mid(“abcdefghijâ€,2,6)
Debug.print varTest
It works fine when I have it in a standard module, and call it (using a
command button onclick event), but when I have it in my form's module and
call it (the same way & with the sub in the standard module removed) I get
the error message.
Is there a reference library I am missing? I don’t even know what they
are, but the ones I have checked are: Visual Basic for Appl., MS Acess 10.0,
OLE Automation, MS DAO 3.6, MS ActiveX Data Obj. 2.1, MS Office 10.0 Obj. Lib.