Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open Form from Cbo Box (Access 2000)

    Good Morning Everyone!

    Should be simple enough....

    I have a simple form with a simple combo box...the combo box stores a list with relative form names in column 2. When selected, I would like the FORM NAME that was selected to open.

    i.e.
    record (1)COLUMN 1 has JOHN DOE and COLUMN 2 has fmGREEN

    record (2)COLUMN 1 has JANE DOE and COLUMN 2 has frmBLUE

    If I select JANE DOE then frmBLUE will open.

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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Open Form from Cbo Box (Access 2000)

    Hello Roberta,

    You can use the Column property of the combo box. It takes a zero-based index: Column(0) is the first column, Column(1) is the second column, etc.

    Example: say that your combo box is named cbxSelect. The code to open the form could be in the AfterUpdate event of the combo box:

    Private Sub cbxSelect_AfterUpdate()
    If cbxSelect.ListIndex <> -1 Then
    DoCmd.OpenForm FormName:=cbxSelect.Column(1)
    End If
    End Sub

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Louisville, Kentucky, USA
    Posts
    605
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Form from Cbo Box (Access 2000)

    Hans,

    Thanks...exactly what I needed.
    Roberta Price <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

Posting Permissions

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