Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Posts
    83

    Unanswered: Need help on Switchboard form

    One of my database Switchboard form consist of a 'Administration' button. I want to restrict this, to only to a 'Editor' group.

    What I was thinking to do is, to verify somehow the group that the login user belongs to, then allow him to view the administration form. If the login user doesnot belongs to that group, then a msgbox saying that you are not allowed to view this form. Any idea, that how can i achieve this? or any other nice way to approach this issue.
    Any clue or idea is greatly appreciated.

  2. #2
    Join Date
    Nov 2003
    Location
    Plymouth, UK
    Posts
    59
    what do you need this area for, because you can set the system up to not show the background tables etc, and they only show when you hold shift when double clicking on your database at load up, this could remove the need for the button all together only a thought!!

  3. #3
    Join Date
    Sep 2003
    Posts
    83
    Originally posted by Davekingwcp
    what do you need this area for, because you can set the system up to not show the background tables etc, and they only show when you hold shift when double clicking on your database at load up, this could remove the need for the button all together only a thought!!

    This Administration switchboard form consists of different forms based on tables to enter or to modify existing medicines, in the tables, and I want it to grant access only to the 'Editor' group, and not everyone else in the database.

    I tried restricting access to other groups for these forms, through the User and Group Permissions window, and also tried restricting access to a user who doesnot belong to the 'Editor' group, but the user is still able to see the forms.

    Hope my problem is clear.

  4. #4
    Join Date
    Nov 2003
    Posts
    40
    Did you try adding a "yes/no" field to your switchboard table? I actually have a switchboard that is similar to what you are looking for. I have a temporary table that has all of the switchboard items. Then depending on the permission I copy the table into the table that will be used to populate the switchboard. So I have an if statement. IF they are administator then copy the entire table ELSE copy only the records that are checked (in the yes/no field)
    I hope that helps your problem.

  5. #5
    Join Date
    Sep 2003
    Posts
    83

    need help in switchboard form

    Originally posted by AdrienneB
    Did you try adding a "yes/no" field to your switchboard table? I actually have a switchboard that is similar to what you are looking for. I have a temporary table that has all of the switchboard items. Then depending on the permission I copy the table into the table that will be used to populate the switchboard. So I have an if statement. IF they are administator then copy the entire table ELSE copy only the records that are checked (in the yes/no field)
    I hope that helps your problem.

    This was something I was looking for.Thanks for the info. I am not still sure how to achieve this. Can you please explain how you did it in little bit more detail.
    Thanks

  6. #6
    Join Date
    Nov 2003
    Posts
    40

    Re: need help in switchboard form

    Okay, the obvious part is adding a yes/no field to your switchboard table. Then of course, check the boxes for the ones that you want to be included in all of the switchboards, and leave the admin options unchecked. (This is in your temp table of course)

    The way I have it set up in mine is that it copies the entire table and then deletes the entries that I don't want them to have. (You can do it the other way too, where you only insert the fields checked, but I have it the other way so that is the code that I am going to copy and paste!)


    DoCmd.RunSQL "INSERT INTO [Switchboard Items] (FIELD1, FIELD2, FIELD3, YESNOFIELD) SELECT tmpSwitchboard.* FROM tmpSwitchboard"

    IF (What ever you are using to determine that they aren't an admin) Then
    DoCmd.RunSQL "DELETE * FROM [Switchboard Items] WHERE [Switchboard Items].YESNOFIELD = No"

    End If

    (IF the switchboard is open at this point in time, then you probably want to refresh it)

    Me.Refresh

    Hope this solves your problem!

Posting Permissions

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