Code:
Dim project1 As Control
Dim friday As Control
Set friday = Forms("frmTimesheetManager").Controls("txtDay6")
project1.Value = DLookup("[Project ID]", "tmptblHours", "[TS_Date] = "[COLOR=Red] & friday.Value[/COLOR])
Anyway around this?
Cheers
EDITED = By the way I should let you know before I declared the above controls, there's a make table query. Hence table name is tmptblHours.
Also, I've already tried project1.Value = DLookup("[Project ID]", "tmptblHours", "[TS_Date] =" & Forms!frmTimesheetManager!txtDay6)
It fails with the same message saying Invalid use of null?
Last edited: