Hi all - this is my first post, but I have read many, many threads previously so thanks in advance.
I'm trying to set a variable called moDate to the value found in a table using the dlookup method.
I have declared moDate as a string and assigned the value using:
moDate = DLookup("[MP]", "tbl_LastRun", "[ProjectType] = '" & datatbl & "'")
The result is "", but when I break the code and type
?DLookup("[MP]", "tbl_LastRun", "[ProjectType] = '" & datatbl & "'") in the immediate window I get a result of DLYPOD.
Why isn't modate getting this value?
Cheers
brimile
I'm trying to set a variable called moDate to the value found in a table using the dlookup method.
I have declared moDate as a string and assigned the value using:
moDate = DLookup("[MP]", "tbl_LastRun", "[ProjectType] = '" & datatbl & "'")
The result is "", but when I break the code and type
?DLookup("[MP]", "tbl_LastRun", "[ProjectType] = '" & datatbl & "'") in the immediate window I get a result of DLYPOD.
Why isn't modate getting this value?
Cheers
brimile