Access
A family of Microsoft relational database management systems designed for ease of use.
392 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I have the following problem: When opening my form, a password request is made via VBA which activates a filter to display only orders of the respective employee.
Now I want to filter by the order number in the form. However, everyone can also enter the order numbers of the other colleagues and receive the results. Is there any possibility that the filter after the employee remains active until you close the form again?
This is my code for password protection:
I am grateful for any help
Greetings Caro
Private Sub Form_open(Cancel As Integer)
Select Case InputBox("Passwort eingeben", "Passwortabfrage")
'DAH
Case "55DAH"
Me.Filter = "[Bearbeiter PL]= 'DAH' And [Abgerechnet]= False"
Me.FilterOn = True
'PAV
Case "99PAV"
Me.Filter = "[Bearbeiter PL]= 'PAV' And [Abgerechnet]= False"
Me.FilterOn = True
'PASSWORTVERGABE ENDE
Case Else
MsgBox "Falsch"
DoCmd.Close acForm, Me.Name
End Select
End Sub