Good evening (for me it is here in Belgium) developers
I would like to open a form in 2 ways : as a User or as a Admin.
I have a table with all the users where the Usertype field has a possible selection User or Admin. (from another table)
When the Usertype is "User" the form should go open and show only the records he/she added. When the Usertype is "Admin" the form should go open and show all the records.
I have some code but I already understand it's not that simple.
I already find out I have to do some 'Recordset' but there is where it stops for me.
Is there someone who can help me with this issue?
Thanks
Greetz
Pascal
I would like to open a form in 2 ways : as a User or as a Admin.
I have a table with all the users where the Usertype field has a possible selection User or Admin. (from another table)
When the Usertype is "User" the form should go open and show only the records he/she added. When the Usertype is "Admin" the form should go open and show all the records.
I have some code but I already understand it's not that simple.
Code:
Private Sub Form_Load()
If [tabelCorrespondenten.Usertype] = ("Admin") Then
DoCmd.OpenForm "FormPP", acNormal
Else
DoCmd.OpenForm "FormPP", , , "Tarifeerder = GetWinUser()"
DoCmd.GoToRecord , , acNewRec
End If
End Sub
I already find out I have to do some 'Recordset' but there is where it stops for me.
Is there someone who can help me with this issue?
Thanks
Greetz
Pascal