M
mon
This code gives me a runtime error 94, invalid use of Null.
It seemed to work a couple of times, but not since then.
It is in the before insert of the form.
Dim LastEntry As Date
Dim LastJob As Long
LastEntry = DMax("[DateEntered]", "tblActivityList")
LastJob = DLookup
("[JobNumber]", "tblActivityList", "[DateEntered]=#" &
LastEntry & "#")
Me.JobNumber = LastJob
Thanks Mon
It seemed to work a couple of times, but not since then.
It is in the before insert of the form.
Dim LastEntry As Date
Dim LastJob As Long
LastEntry = DMax("[DateEntered]", "tblActivityList")
LastJob = DLookup
("[JobNumber]", "tblActivityList", "[DateEntered]=#" &
LastEntry & "#")
Me.JobNumber = LastJob
Thanks Mon