G
Gary D.
Can somebody please help with a MDE file reference problem?
I have two Access97 databases/applications.
Each of these has a single standard module and each contains one
public function, declared in the same manner.
Both database have been converted into MDE files and are used as
library databases.
DB1 is called "Data Encryption" (Tools…Options…Advanced…Project Name).
The module is call "XED"'.
The function is "SecureData"'.
DB2 is called "Utilslib".
The module is call "UTILS"'.
The function is "Duration"' (I've checked and Duration is not a
reserved word).
These are used thus:-
DB1 is called by another database (DB3) and within a form a call is
made thus:-
Me!txtAccountTag = SecureData("D", _
lngKey, _
Me!AccountTag.Value)
The form module has the reference declared via Tools… References
This call works just fine.
DB2 is called by another database (DB4) and within a form a call is
made thus:-
Me!Drn = Duration(Nz(Me!TimeS.Value, "00:00:00"), _
Nz(Me!TimeE.Value, "00:00:00"))
The form module has the reference declared via Tools… References
However, the call in DB4 fails with error code 13, "Type mismatch".
I have tried defining the Duration function with its parameters as
both ByVal and ByRef, without any difference.
If I prefix the word "Duration" with "GJDUtilsLib." to give
"GJDUtilsLib.Duration" then the call works okay.
Why?
PS. the only difference between the two library databases is that DB1
is owned by a different user/owner than DB2, but that doesn't explain
why prefixing it with "GJDUtilsLib." Works when it fails without the
prefix.
I have two Access97 databases/applications.
Each of these has a single standard module and each contains one
public function, declared in the same manner.
Both database have been converted into MDE files and are used as
library databases.
DB1 is called "Data Encryption" (Tools…Options…Advanced…Project Name).
The module is call "XED"'.
The function is "SecureData"'.
DB2 is called "Utilslib".
The module is call "UTILS"'.
The function is "Duration"' (I've checked and Duration is not a
reserved word).
These are used thus:-
DB1 is called by another database (DB3) and within a form a call is
made thus:-
Me!txtAccountTag = SecureData("D", _
lngKey, _
Me!AccountTag.Value)
The form module has the reference declared via Tools… References
This call works just fine.
DB2 is called by another database (DB4) and within a form a call is
made thus:-
Me!Drn = Duration(Nz(Me!TimeS.Value, "00:00:00"), _
Nz(Me!TimeE.Value, "00:00:00"))
The form module has the reference declared via Tools… References
However, the call in DB4 fails with error code 13, "Type mismatch".
I have tried defining the Duration function with its parameters as
both ByVal and ByRef, without any difference.
If I prefix the word "Duration" with "GJDUtilsLib." to give
"GJDUtilsLib.Duration" then the call works okay.
Why?
PS. the only difference between the two library databases is that DB1
is owned by a different user/owner than DB2, but that doesn't explain
why prefixing it with "GJDUtilsLib." Works when it fails without the
prefix.