In my database the user inputs a new job to schedule delivery. The user inputs the main job information and then inputs the lots to be delivered in a subform. After the user inputs the lot and plan information, a message box pops up asking if the user would like to input Options for this lot. If the user says "Yes" then the Options form opens.
The DelID, JobCode, Lot, Plan info is carried over from the Delivery form to the Options form. The the user inputs the options for that lot into a subform. I want the Options form to open to the lot if it has already been entered and they need to make changes or add more options or open to a new record if it is not already in there. There could be server Lot forms based on the Delivery ID. So the form needs to open based on DelID and Lot.
The code I have is below:
Private Sub Plan_AfterUpdate()
Dim Update As Integer
Update = MsgBox("Do you want to add Options for this Lot?", vbYesNo)
If Update = vbYes Then
DoCmd.OpenForm "frmLotOptions"
DoCmd.GoToRecord , , acNewRec
Call TranferData5
Else
If Update = vbNo Then
Me.Qty.SetFocus
End If
End If
End Sub
Any ideas?
The DelID, JobCode, Lot, Plan info is carried over from the Delivery form to the Options form. The the user inputs the options for that lot into a subform. I want the Options form to open to the lot if it has already been entered and they need to make changes or add more options or open to a new record if it is not already in there. There could be server Lot forms based on the Delivery ID. So the form needs to open based on DelID and Lot.
The code I have is below:
Private Sub Plan_AfterUpdate()
Dim Update As Integer
Update = MsgBox("Do you want to add Options for this Lot?", vbYesNo)
If Update = vbYes Then
DoCmd.OpenForm "frmLotOptions"
DoCmd.GoToRecord , , acNewRec
Call TranferData5
Else
If Update = vbNo Then
Me.Qty.SetFocus
End If
End If
End Sub
Any ideas?