I am having a problem getting the information i entered in one form to transfer over to another. I want to take the data entered in specific fields and auto fill them into another form i open using DoCmd.OpenForm. Any help would be greatly appreciated. Below is a snippet of the VBA code i am trying to use. I am green when it comes to VBA and Access so i am probably doing this completely wrong.
Code used:
Dim ID As Long
DoCmd.OpenForm "JobLogForm"
DoCmd.GoToRecord , , acNewRec
ID = DMax("JobID", "JobList")
JobIDCopy = ID
JobLogRecDate = Dlookup("JobRec", "JobList", "JobID=" & ID)
JobLogDueDate = Dlookup("JobDueBy", "JobList", "JobID=" & ID)
JobLogDes = Dlookup("JobDes", "JobList", "JobID=" & ID)