Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243

    Unanswered: Restrictions on viewing reports

    My database contains linked tables. These tables come from a 3rd-party DB and is used by our HR-department.
    Sometimes they forget to fill in a certain field wich is quite important for my DB.
    Therefor I perform a check on startup.
    If in some records the field is missing I show a report, else it won't be displayed.
    I did this with VB-code (the recordset is used as source of my report)

    Code:
    dim rs as recordset
    
    rs.open "select name from myTable where field is missing"
    
    if rs.recordcount > 0 then
    DoCmd.OpenReport myReport, acViewPreview
    end if
    I created some users in Access and 1 of them is not allowed to see this report. When he starts up the DB he gets an error saying he's not allowed to read the report. The only things he can do now is closing the application or debugging it.
    Is there any way I can work around this issue.
    I could check like this :

    Code:
    if currentUser = "name" then do nothing else openReport
    but in the near future a lot of other users will be added, so this is not an option


    Thanks
    Last edited by artemide; 08-06-03 at 11:14.

  2. #2
    Join Date
    Aug 2003
    Location
    Bosnia & Hercegovina
    Posts
    57
    you could use 'on error' instead of checking with 'if', and if it's the right error just continue, otherwise quit, debug or whatever....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •