I wonder if anyone can help...I'm using domain functions to get data for a pop-up detailing last record in a table & number of entries made that day...the relevant part of the code is:
Dim dtLast As Date
Dim intCount As Integer
dtLast = DMax("[Date Received]", "tblLoad")
intCount = DCount("[Date Received]", "tblLoad", "[Date Received] = dtLast")
However, I get an error "The object doesn't contain the automation object 'dtLast'
I've tried many different syntaxes but always get a 'type mismatch' error.
I'd appreciate any words of wisdom!
Thanks
Dim dtLast As Date
Dim intCount As Integer
dtLast = DMax("[Date Received]", "tblLoad")
intCount = DCount("[Date Received]", "tblLoad", "[Date Received] = dtLast")
However, I get an error "The object doesn't contain the automation object 'dtLast'
I've tried many different syntaxes but always get a 'type mismatch' error.
I'd appreciate any words of wisdom!
Thanks