T
tina
Hi
I have designed 2 forms for user input one for morning shift one for late
shift they input Date noofemployee notemps etc each form has a field called
shift with default value of "M" or "L" .after data is entered user clicks
command button to accept entries which writes data into employee table.
My problem is as date is same data is overwritten .How can I get 2 rows for
each date ??
hope this makes sense
Thanks
Tina
code as follows
Private Sub Command4_Click()
On Error GoTo Err_Command4_Click
Me.ProductionDate = Me.Text1
Me.Shift = "M"
Me.NoOfEmployees = Me.Text7
Me.NoOfTemps = Me.Text13
Me.NoOfPartTemps = Me.Text19
Me.NoOfPartTempsHours = Me.Text21
DoCmd.Close
Exit_Command4_Click:
Exit Sub
Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click
End Sub
Private Sub Command4_Click()
On Error GoTo Err_Command4_Click
Me.ProductionDate = Me.Text1
Me.Shift = "L"
Me.NoOfEmployees = Me.Text7
Me.NoOfTemps = Me.Text13
Me.NoOfPartTemps = Me.Text19
Me.NoOfPartTempsHours = Me.Text21
DoCmd.Close
Exit_Command4_Click:
Exit Sub
Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click
End Sub
I have designed 2 forms for user input one for morning shift one for late
shift they input Date noofemployee notemps etc each form has a field called
shift with default value of "M" or "L" .after data is entered user clicks
command button to accept entries which writes data into employee table.
My problem is as date is same data is overwritten .How can I get 2 rows for
each date ??
hope this makes sense
Thanks
Tina
code as follows
Private Sub Command4_Click()
On Error GoTo Err_Command4_Click
Me.ProductionDate = Me.Text1
Me.Shift = "M"
Me.NoOfEmployees = Me.Text7
Me.NoOfTemps = Me.Text13
Me.NoOfPartTemps = Me.Text19
Me.NoOfPartTempsHours = Me.Text21
DoCmd.Close
Exit_Command4_Click:
Exit Sub
Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click
End Sub
Private Sub Command4_Click()
On Error GoTo Err_Command4_Click
Me.ProductionDate = Me.Text1
Me.Shift = "L"
Me.NoOfEmployees = Me.Text7
Me.NoOfTemps = Me.Text13
Me.NoOfPartTemps = Me.Text19
Me.NoOfPartTempsHours = Me.Text21
DoCmd.Close
Exit_Command4_Click:
Exit Sub
Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click
End Sub