I have a number of forms with options on and then the user clicks a command button which is meant to insert a an InstanceEnd time into the underlying table (the InstanceStart has already been populated) Create a new record and insert a new InstanceStart time into the new record the user is then led through the selection forms again and the whole process continues in a loop.
The problem i am having is that i am able to create the new records but the first one is the only one being populated. Code that i am using in the command button On_Click is below any help would be appreciated.
Regards
Adrian
Private Sub cmdStart_Click()
InstanceEnd = Time
DoCmd.GoToRecord , , acNewRec
InstanceStart = Time
DoCmd.Close
DoCmd.OpenForm "frmLineRunning", acNormal
End Sub
Private Sub cmdStop_Click()
InstanceEnd = Time
DoCmd.GoToRecord , , acNewRec
InstanceStart = Time
DoCmd.Close
DoCmd.OpenForm "frmDetailsCorrect", acNormal
End Sub
The problem i am having is that i am able to create the new records but the first one is the only one being populated. Code that i am using in the command button On_Click is below any help would be appreciated.
Regards
Adrian
Private Sub cmdStart_Click()
InstanceEnd = Time
DoCmd.GoToRecord , , acNewRec
InstanceStart = Time
DoCmd.Close
DoCmd.OpenForm "frmLineRunning", acNormal
End Sub
Private Sub cmdStop_Click()
InstanceEnd = Time
DoCmd.GoToRecord , , acNewRec
InstanceStart = Time
DoCmd.Close
DoCmd.OpenForm "frmDetailsCorrect", acNormal
End Sub