Montez659,
I am not sure if I am doing this correctly, the info does go into the table when I run the code but it leaves blank cells. Let me see if I can explain the user form a little better
First text box
Control- EmployeeNumber
Employee scans badge
Second, third and fourth text boxes
Control - ItemNumber
Control - ShopOrderNumber
Control - OpNumber
the employee scans a barcode and there is some code that splits it into the 3 text boxes
Fifth text box
Control - GoodPcs
Employee enters with keypad
Sixth text box
Control - ScrapPcs
Employee enters with key pad
Seventh combo box
Control - ScrapReason
Employee selects reason code from drop down box
Eighth combo box
Control - StartTime
Employee selects the time they started the job
ninth text box
Control - StopTime
Default value = Time()
Last text box
Control - Date
Default value =Date()
The form works fine as the employee scans or enters data for each box, but an example where I need help and they are asking me to change it is in this situation, an employee may run for 8 hours and have 1000 good parts, they may have 20 scrap parts, 5 for reason 1, 5 for reason 2 and 10 for reason 3 and so on. When they enter the data into the form the do as above but only can enter one reason code in with that pass, they want to enter the other 2 reason codes in with out having to scan their badge and order form all over again. So what I need to happen is for them to only have to enter the scrap quantity and select the reason code on the second and third pass. In the table I need the fields EmployeeNumber, ItemNumber, ShopOrderNumber, OpNumber, and date to be matched up with the same data that was entered on the first pass, I don't need good, starttime or stoptime they can be left blank in this row of the table. i tried your code and it enters but it does not seem to be doing what I need, here is how I changed it.
Code:
Private Sub Command46_Click()
a = MsgBox("Do you want to enter extra scrap codes?", vbYesNo)
If a = vbYes Then
varEmployeeNumber = Me!EmployeeNumber.Value
varItemNumber = Me!ItemNumber.Value
varShopOrderNumber = Me!ShoporderNumber.Value
varOpNumber = Me!OpNumber.Value
RunCommand acCmdRecordsGoToNew
Me!Employee_Number = varEmployee_Number
Me!ItemNumber.Value = varItemNumber
Me!ShoporderNumber.Value = varShopOrderNumber
varOp_Number = Me!OpNumber.Value
MsgBox ("Thank You")
End If
End Sub