D
deb
I have a button (Find Record) on a popup form that brings up a list of
records to choose from. When a record is clicked it finds and displays the
particular record in the main form form. (see code below)
When a project manager displays a record, he sometimes displays and edits a
record that does not belong to him.
How can I check to see if the user is the project manager and if he is not
the project manager display a message "This record belongs to Mike Smith, are
you sure you want to edit?" with an ok cancel option.
I have a PM table that has userID and Project manager name.
Private Sub ShowRecord4_Click()
Dim Rst As DAO.Recordset
' Store the recordset for the form.
Set Rst = Forms!f4ShipmentEdit.RecordsetClone
' Locate the record for the selected.
Rst.FindFirst "ShipmentID= " & List4
' Set the form's Bookmark property to move to the record.
Forms!f4ShipmentEdit.Bookmark = Rst.Bookmark
' Close the dialog box.
DoCmd.Close acForm, "f4ShipmentEditGoTo"
End Sub
records to choose from. When a record is clicked it finds and displays the
particular record in the main form form. (see code below)
When a project manager displays a record, he sometimes displays and edits a
record that does not belong to him.
How can I check to see if the user is the project manager and if he is not
the project manager display a message "This record belongs to Mike Smith, are
you sure you want to edit?" with an ok cancel option.
I have a PM table that has userID and Project manager name.
Private Sub ShowRecord4_Click()
Dim Rst As DAO.Recordset
' Store the recordset for the form.
Set Rst = Forms!f4ShipmentEdit.RecordsetClone
' Locate the record for the selected.
Rst.FindFirst "ShipmentID= " & List4
' Set the form's Bookmark property to move to the record.
Forms!f4ShipmentEdit.Bookmark = Rst.Bookmark
' Close the dialog box.
DoCmd.Close acForm, "f4ShipmentEditGoTo"
End Sub