Results 1 to 2 of 2
  1. #1
    accessbro is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    23

    Admin Settings form

    I have a main form called frm_Main. It has a few controls including a button that opens a form called frm_Admin. The purpose of the admin form is to let the user choose between two modes, development and production. If the user chooses development, different controls will be set to visible on frm_Main and if it's set to production, other forms will be visible and the controls for development settings will be hidden. How can I set this up?



    I was thinking about creating a table called tbl_Admin. It would have two fields, "mode" and "active". Then I would have two records in the table, one called "Dev" and the other one called "Prod". The active field would be true/false for both of them. tbl_Admin would be the record source for frm_Admin. frm_Admin would have a combobox with two choices for "Development" and "Production". Based on the user's choice, the records in tbl_Admin would be updated so that only one of "Dev" or "Prod" are set to true while the other one is false.

    I'm not sure if I'm headed in the right direction. Does anyone have any ideas or input?

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Seems kinda complex to me.

    Could try:
    Each control has a TAG property.
    The controls for development can have "Dev" in the TAG property.
    The controls for production can have "Prod" in the TAG property.
    When the admin form opens, code can run to look at the button on frm_Main to determine which controls should be visible. The code would then set the visible property of each control.

    Loop through the controls collection, checking the TAG property.

    'Air code!!!
    Code:
    .
    .
    .
      Select Case ControlTag  'ie the TAG property
         Case "Dev"
             ' set visible to TRUE
         Case "Prod"
             ' Set visible to True
         Case Else
             'Who cares
      End Select
    .
    .
    .

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 06-09-2014, 01:30 PM
  2. MDB Admin
    By marcieldeg in forum Access
    Replies: 5
    Last Post: 03-20-2014, 02:30 AM
  3. admin login on access??
    By rthakral in forum Access
    Replies: 2
    Last Post: 08-21-2013, 12:57 PM
  4. Restricted Access - Admin v. User
    By need_help12 in forum Security
    Replies: 4
    Last Post: 04-30-2012, 09:51 AM
  5. Admin Rights
    By Keri in forum Security
    Replies: 4
    Last Post: 11-18-2005, 11:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums