1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| '*****************************************
'Bouton Form User
'*****************************************
Sub BoutonFormUser(ByVal itemnumber As Long)
Dim strnomForm As String
Dim acces_level As Integer
Dim NomFiltre As String
On Error GoTo err_BoutonFormUser
strnomForm = Nz(DLookup("Argument", "Switchboarditems", "itemnumber=" & itemnumber), "")
If strnomForm = "" Then
MsgBox "Il n'y a aucune Option Disponible!", vbInformation, "Option non Valide!"
Exit Sub
Else
acces_level = Nz(DLookup("niveau_acces", "tbl_secouriste", "IDsecouriste=Forms!hiddenform!IDsecouristevar"), 0)
If acces_level < 3 Then
DoCmd.Close
DoCmd.OpenForm [strnomForm], acNormal
Exit Sub
Else
NomFiltre = Forms!hiddenform!IDsecouristevar
DoCmd.Close
DoCmd.OpenForm [strnomForm], acNormal, , "liste des secouristes" = NomFiltre 'Mon problème semble être ici !!
End If
End If
exit_BoutonFormUser:
Exit Sub
err_BoutonFormUser:
MsgBox Err.Description
Resume exit_BoutonFormUser
End Sub |
Partager