A
Amir
Hi!
How can I use the DLookup function to return
all the values of the ProductKey field in the
table tblProduct, where the product key is equal
to the NewData parameter?
I need to do so in way that I can use variables
(All string typed), but I am having problem with
all the quotation marks.. I don't know how much to
put in each place.
The variables are:
strTriggeringValue = "" & NewData & ""
strTableName = "tblProducts"
strFieldName = "ProductKey"
I've tried (In the same line, of course):
MsgBox DLookup("""[" & strFieldName & "]""",
"" & strTableName & "",
""[" & strFieldName & "] = " & strTriggeringValue & """"), , "title"
but it produces a syntax error. How can I do it correctly?
Amir.
How can I use the DLookup function to return
all the values of the ProductKey field in the
table tblProduct, where the product key is equal
to the NewData parameter?
I need to do so in way that I can use variables
(All string typed), but I am having problem with
all the quotation marks.. I don't know how much to
put in each place.
The variables are:
strTriggeringValue = "" & NewData & ""
strTableName = "tblProducts"
strFieldName = "ProductKey"
I've tried (In the same line, of course):
MsgBox DLookup("""[" & strFieldName & "]""",
"" & strTableName & "",
""[" & strFieldName & "] = " & strTriggeringValue & """"), , "title"
but it produces a syntax error. How can I do it correctly?
Amir.