Hi
I hope I am explaining clearly what I want to happen. I want when I select the staff on form frmManager2 it is saved in the table tblMeasure as MUserLoginID, then when I enter form frmMMeasures it is reflected on the form in the textbox MUserLoginID. Based on the code posted above I added the lines in red to the cmdMeasures_Click () but it still is not recorded in the tblMeasure and the value is not passed to the form open. Any help will be welcomed.
Thanks.
Code:
Private Sub cmdMeasures_Click()
On Error GoTo cmdMeasures_Click_Err
If IsNull(Me.cboDeptName) Then
MsgBox "You need to select a Department!", vbCritical
Me.cboDeptName.SetFocus
Exit Sub
End If
If IsNull(Me.cboPositionName) Then
MsgBox "You need to selct the Position!", vbCritical
Me.cboPositionName.SetFocus
Exit Sub
End If
If IsNull(Me.cboStaff) Then
MsgBox "You need to select the staff being appraised!", vbCritical
Me.cboStaff.SetFocus
Exit Sub
End If
DoCmd.OpenForm "frmMMeasures", , , "MUserLoginID = " & Me.cboStaff
DoCmd.Close acForm, "frmManager2"
cmdMeasures_Click_Exit:
Exit Sub
cmdMeasures_Click_Err:
MsgBox Error$
Resume cmdMeasures_Click_Exit
End Sub