User Permissions (Joan)

T

Todd

Joan,

Please don't give up on me yet. I'm not sure if you read my last post from
before (user permissions: 3/2/07) but here the status now:

I did everything mentioned and it does work with the exception of two things:

1. When I'm logged on as myself (admin) it works fine, the reports pull up
all regions. But when I'm logged on as one of the users for a regions it
pulls up all regions info and not just that regions data still.

2. When I'm logged on as a user from a region and select the first report
(which is the mileagegasmaintrpt from your example) it prompts me for a
username when I click the print preview or the print command button. In the
query that is this reports recordsource I have no field for username. I
removed the usernametbl from this query completely. It does not do this for
any other report I select as a user.

It seems to have something to do with the code location in the Case 1 code
and also where it prompts for a username in the mileagegasmaintrpt.

Below is the code I entered for the print and print preview click event:

Private Sub printpreview_Click()
Select Case Report
Case 1
If faq_IsUserInGroup("Admins", CurrentUser) Then
DoCmd.OpenReport "mileagegasmaintrpt", acPreview
Else
DoCmd.OpenReport "mileagegasmaintrpt", acPreview, , "username=" &
Chr(34) & CurrentUser() & Chr(34)
End If
Case 8
DoCmd.OpenReport "mileagegasmaintrptsummary", acPreview
Case 3
DoCmd.OpenReport "serviceandexpirationrpt", acPreview

Private Sub print_Click()
Select Case Report
Case 1
If faq_IsUserInGroup("Admins", CurrentUser) Then
DoCmd.OpenReport "mileagegasmaintrpt"
Else
DoCmd.OpenReport "mileagegasmaintrpt", , , "username=" & Chr(34) &
CurrentUser() & Chr(34)
End If
Case 8
DoCmd.OpenReport "mileagegasmaintrptsummary"
Case 3
DoCmd.OpenReport "serviceandexpirationrpt"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top