L
Lars R. Jensen
Hello.
Please look at this scenario:
Access 2003
WorkLib.mda:
Table: tblSetup
'Function in a Module
Public function GetServerDir(...) as String
...
strResult = Nz(DLookup("[Value]", "tblSetup", strCrit), "")
...
End function
CTS.mde references WorkLib.mda
Public Sub ShowLib()
Debug.Print GetServerDir(...)
End Sub
If I run the ShowLib sub from the CTS.mde file, it looks for the table
tblSetup in the CTS.mde file, not in the WorkLib.mda file as I want it to. I
know it will work if I just link to the tblSetup table from the CTS.mde
file, but I want WorkLib.mda to handle the table data and just deliver the
result. My question is:
How do I mould the DLookup statement to look at the CodeData, not the
CurrentData?
Is it possible at all?
Maybe I should do a regular query instead?
Thanks in advance and best regards,
Lars R. Jensen.
Please look at this scenario:
Access 2003
WorkLib.mda:
Table: tblSetup
'Function in a Module
Public function GetServerDir(...) as String
...
strResult = Nz(DLookup("[Value]", "tblSetup", strCrit), "")
...
End function
CTS.mde references WorkLib.mda
Public Sub ShowLib()
Debug.Print GetServerDir(...)
End Sub
If I run the ShowLib sub from the CTS.mde file, it looks for the table
tblSetup in the CTS.mde file, not in the WorkLib.mda file as I want it to. I
know it will work if I just link to the tblSetup table from the CTS.mde
file, but I want WorkLib.mda to handle the table data and just deliver the
result. My question is:
How do I mould the DLookup statement to look at the CodeData, not the
CurrentData?
Is it possible at all?
Maybe I should do a regular query instead?
Thanks in advance and best regards,
Lars R. Jensen.