tractorvix
Technical User
Hi,
I can't figure out why the below code won't bring back the right information. I think it may be a formatting issue, but I just can't seem to get it to work
curdate = Me.Text0
CurHours = Nz(DLookup("[sumofhours]", "qrysumweeks", "[wkdate] = " & curdate), 0)
The DLookup is recognising the correct date for curdate, but doesn't seem to be able to match it in the qrysumweeks, even though I know there is data there. I've set both curdate and wkdate to short date but it still brings back a 0 for sum of hours rather than the 42 it should be pulling back.
Any ideas?
TV
I can't figure out why the below code won't bring back the right information. I think it may be a formatting issue, but I just can't seem to get it to work
curdate = Me.Text0
CurHours = Nz(DLookup("[sumofhours]", "qrysumweeks", "[wkdate] = " & curdate), 0)
The DLookup is recognising the correct date for curdate, but doesn't seem to be able to match it in the qrysumweeks, even though I know there is data there. I've set both curdate and wkdate to short date but it still brings back a 0 for sum of hours rather than the 42 it should be pulling back.
Any ideas?
TV