G
Guest
Can any of the experts out there point me in the direction of some tutorials,
explanations, resources etc, on how to use the Dlookup function.
John Spencer was kind enough yesterday to help me with a problem I had with
a Dlookup function, and today I have a similar problem which I can't solve,
and finding information is pretty hit and miss.
I have posted the problem below just to get me going on my project again,
but I really want to understand exactly how this works as I don't want to
keep bothering people when I should know the answers myself.
I need to get the value of a field called 'SerialNumber' from the last row
of a datatable. I used Dmax to get the ID number for the last row, and then I
do a Dlookup using that value but it doesn't work (again!)
intUnique = DMax("[ID]", "[tblMainDataTable]")
intLastSerialNumber = DLookup("[SerialNumber]", "[tblMainDataTable]", _
"[ID]=""" & intUnique & """")
Thanks for your patience in helping.
Neil
explanations, resources etc, on how to use the Dlookup function.
John Spencer was kind enough yesterday to help me with a problem I had with
a Dlookup function, and today I have a similar problem which I can't solve,
and finding information is pretty hit and miss.
I have posted the problem below just to get me going on my project again,
but I really want to understand exactly how this works as I don't want to
keep bothering people when I should know the answers myself.
I need to get the value of a field called 'SerialNumber' from the last row
of a datatable. I used Dmax to get the ID number for the last row, and then I
do a Dlookup using that value but it doesn't work (again!)
intUnique = DMax("[ID]", "[tblMainDataTable]")
intLastSerialNumber = DLookup("[SerialNumber]", "[tblMainDataTable]", _
"[ID]=""" & intUnique & """")
Thanks for your patience in helping.
Neil