Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002

    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)

    dim rs as recordset "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 :

    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

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

  2. #2
    Join Date
    Aug 2003
    Bosnia & Hercegovina
    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