customised reports depending on user login

osullipa

Registered User.
Local time
Today, 18:16
Joined
Dec 7, 2004
Messages
31
I want to print different versions of a report depending on on the user login id "quserid" which I have on a login form "authorise".

As a simple example I have tried using a single user with the syntax shown below but get an error message "Object required". I suspect the problem is in the way I identidfied the quserid field. Can anyone please advise me on this.
Regards
Peter

If AUTHORISE.quserid = "ADMIN" Then
Dim stDocName As String

stDocName = "FUNDING CONFIRMATION LETTER"
DoCmd.OpenReport stDocName, acNormal
Exit_PrintConfirmationLetter_Click:
Exit Sub

Err_PrintConfirmationLetter_Click:
MsgBox Err.DESCRIPTION
Resume Exit_PrintConfirmationLetter_Click
End If
 
Hello,

I think that first line should be like this:

If [Forms]![AUTHORISE]![quserid] = "ADMIN" Then

This is if the forum in question is still opened ofcourse.
 

Users who are viewing this thread

Back
Top Bottom