Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Mar 2001
    Posts
    159
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Switch Board (2000)

    What I am looking for may require VBA. If so I'm SOL. I am creating an Employee Database. I would like to have a Switchboard that shows all employees on the left hand side of the switch board and then has buttons on the right that will take me to the different forms to input data about those employees.

    Is it possible to have a list displayed on a switchboard?

    TIA

    Bret

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Switch Board (2000)

    Are you referring to the Switchboard that you build with a wizard, and is essentially a menuing system? If so, it can be modified, and may not require some VBA to make things work correctly. One solution would be to put a combo box on the Switchboard form to select an employee. Since the Switchboard doesn't provide for a way to open a form to a specific record, you would need to set the SQL behind the form to use the value of the combo box to get the specific employee record.

    Another approach that wouldn't involve messing with the Switchboard form would be to build a simple form with one combo (or list box), and place buttons using the button wizard. The wizard has an option to open a specific record on a form, so it writes the VBA for you. Hope this helps.
    Wendell

  3. #3
    2 Star Lounger
    Join Date
    Mar 2001
    Posts
    159
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switch Board (2000)

    Thanks Wendell. I'll give this a try. I also have another question. I want the query to ask who I am looking for. But I can't for the life of me I can't think of how to do it.

    Thanks again.

  4. #4
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Wellington, New Zealand
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switch Board (2000)

    In the criteria of the query you need to put a parameter. This can either be a value that the user has to type in, or references a form using the following notation:

    forms!frmname!controlname

    where frmname is the name of the form and controlname is the name of the control that has the value that you are wanting to search on .. ie, if you have a last name field, then it may reference this

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Switch Board (2000)

    Jayden has pretty much pegged it. I presume your employeeid combo box has the ID number of the employee as it's value. Thus the query that the employee info form is based on should have the employeeid as one of it's field, and the criteria for that field would be:
    Forms![Switchboard]![employeeid]
    Note that this could be a list box as well, though they are a little more complex to deal with.
    Wendell

Posting Permissions

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