Search Form & Error Messages (1 Viewer)

Gaddy

Wookie
Local time
Today, 06:26
Joined
Dec 16, 2012
Messages
46
I'm going down a different route now.

Rather than opening frmUser, I've created a new form that displays the relevant users in a continuous form so the records are laid out like a spreadsheet.

Then on double click of the relevant record it will display that user in frmUser.

Just need to edit the code to open the correct record.

EDIT: Fixed.

Code:
Private Sub txtPayrollID_DblClick(Cancel As Integer)
    Dim sWHERE As String
    sWHERE = "[PayrollID] Like '*" & Me.txtPayrollID & "*'"

    DoCmd.OpenForm "frmUser", acNormal, , sWHERE, acFormEdit
            Forms!frmUser.Header0.Caption = "Edit User"
            Forms!frmUser.txtPayrollID.Locked = True
            Forms!frmUser.txtForename.Locked = True
            Forms!frmUser.txtSurname.SetFocus
End Sub
 
Last edited:

Users who are viewing this thread

Top Bottom