Hello,
I am creating a production time database where a workstation logs in and a form is created for that login. I've used Allen Browne's sample to create the instances, however the forms are not just searching for a record. The time form includes a subform that records the start and end time based upon button programs. The programming I have works for a single instance, however when I have multiple instances running, the fields in the parent and child form are overwritten by the changes in other instances. I'm a novice at programming. How do I identify each by the instanceID?
Here is the code for the clockin or start button:
I am creating a production time database where a workstation logs in and a form is created for that login. I've used Allen Browne's sample to create the instances, however the forms are not just searching for a record. The time form includes a subform that records the start and end time based upon button programs. The programming I have works for a single instance, however when I have multiple instances running, the fields in the parent and child form are overwritten by the changes in other instances. I'm a novice at programming. How do I identify each by the instanceID?
Here is the code for the clockin or start button:
Code:
Me.frmClockIn_SUB.SetFocus
Me.frmClockIn_SUB!TimeID.SetFocus
DoCmd.GoToRecord , , acNewRec
Me.frmClockIn_SUB!WorkstationID = Me.cboWorkstationID
Me.frmClockIn_SUB!InstanceID = Me.Hwnd
Me.frmClockIn_SUB!TimeIN = Now
Me.frmClockIn_SUB!DayName = Date
Me.frmClockIn_SUB!cboProduct = Me.Product_Number
Me.frmClockIn_SUB!Rework = Me.Rework
Me.frmClockIn_SUB!CurrentStatus = "In Progress"
RunCommand acCmdSaveRecord