Results 1 to 2 of 2

Thread: Open Args (97)

  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Louisville, Kentucky, USA
    Thanked 0 Times in 0 Posts

    Open Args (97)

    I have a welcome screen that requires the user to input a password when entering the db. If the user inputs the correct password the switchboard opens up. On the switchboard there is of course a forms option. In the forms option is a User1 form and a User2 form option. What I am hoping to accomplish is, if User1 is the one who provided the correct password when entering the db, then the only related forms on the switchboard for User1 appear rather than everyone elses. Can this be accomplished? I thought it could somehow through the OpenArgs.

    Thanks in advance.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Indianapolis, Indiana, USA
    Thanked 0 Times in 0 Posts

    Re: Open Args (97)

    Hi Roberta,

    You're on the right track. When you open your switchboard form, you'll need to pass a value through the OpenArgs argument (of the DoCmd.OpenForm method).

    Simply use a Select Case statement in your switchboard:<pre>Select Case OpenArgs
    Case "User1"
    txt1.Visible = True
    btn1.Vislble = True
    txt2.Visible = False
    btn2.Visible = False
    Case "User2"
    txt1.Visible = False
    btn1.Viaible = False
    txt2.Visible = True
    btn2.Visible = True
    End Select</pre>

    HTH <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

Posting Permissions

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