+ Reply to Thread
Results 1 to 6 of 6

Dynamic Entries

  1. #1
    Richard
    Guest

    Dynamic Entries

    Hello,

    I am trying to make a form where there will be a choice between A and B.
    Should option A be selected within the form, I need a list to appear - say
    options 1-10; should B be selected, I need a different list to appear. Can
    anybody shed some insight please?

    Thanks in advance,
    Richard

  2. #2
    sebastienm
    Guest

    RE: Dynamic Entries

    Hi,
    Assuming you have:
    - 2 option buttons: optA and optB
    - a frame fraA containing the controls (options buttons or listbox...) to be
    displayed when optA is selected
    - a frame fraB containing the controls (options buttons or listbox...) to be
    displayued when optB is selected.
    Use the code below to alternate the display when optA or optB is clicked.

    '--------------------------------------------
    Sub ChangeForm()
    If optA.Value = True Then
    fraB.Visible = False
    fraA.Visible = True
    Else
    fraA.Visible = False
    fraB.Visible = True
    End If
    End Sub

    Private Sub optA_Change()
    ChangeForm
    End Sub

    Private Sub optB_Change()
    ChangeForm
    End Sub
    '--------------------------------------

    Regards,
    Sébastien

    "Richard" wrote:

    > Hello,
    >
    > I am trying to make a form where there will be a choice between A and B.
    > Should option A be selected within the form, I need a list to appear - say
    > options 1-10; should B be selected, I need a different list to appear. Can
    > anybody shed some insight please?
    >
    > Thanks in advance,
    > Richard


  3. #3
    Tom Ogilvy
    Guest

    Re: Dynamic Entries

    A userform? A worksheet made to look like a paper form? what do you mean by
    Form?

    How does the user make a choice?

    When you say a list will appear - you mean a listbox?

    The more detail you can describe, the more focused the answer will be.

    --
    Regards,
    Tom Ogilvy

    "Richard" <[email protected]> wrote in message
    news:[email protected]...
    > Hello,
    >
    > I am trying to make a form where there will be a choice between A and B.
    > Should option A be selected within the form, I need a list to appear - say
    > options 1-10; should B be selected, I need a different list to appear.

    Can
    > anybody shed some insight please?
    >
    > Thanks in advance,
    > Richard




  4. #4
    Bob Phillips
    Guest

    Re: Dynamic Entries

    Perhaps

    Private Sub OptionButton1_Click()
    ListBox1.RowSource = "A1:A10"
    ListBox1.ListIndex = 1

    End Sub

    Private Sub OptionButton2_Click()
    ListBox1.RowSource = "B1:B10"
    ListBox1.ListIndex = 1

    End Sub

    --
    HTH

    Bob Phillips

    "Richard" <[email protected]> wrote in message
    news:[email protected]...
    > Hello,
    >
    > I am trying to make a form where there will be a choice between A and B.
    > Should option A be selected within the form, I need a list to appear - say
    > options 1-10; should B be selected, I need a different list to appear.

    Can
    > anybody shed some insight please?
    >
    > Thanks in advance,
    > Richard




  5. #5
    Richard
    Guest

    Re: Dynamic Entries

    There is for example; combobox A where there are say 2 items. If Item #1 is
    selected, then Combobox B has say 10 items to choose from. If item #2 is
    selected from combobox A, then combobox B has 7 items to choose from.

    Thanks,
    Richard

    "Tom Ogilvy" wrote:

    > A userform? A worksheet made to look like a paper form? what do you mean by
    > Form?
    >
    > How does the user make a choice?
    >
    > When you say a list will appear - you mean a listbox?
    >
    > The more detail you can describe, the more focused the answer will be.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Richard" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hello,
    > >
    > > I am trying to make a form where there will be a choice between A and B.
    > > Should option A be selected within the form, I need a list to appear - say
    > > options 1-10; should B be selected, I need a different list to appear.

    > Can
    > > anybody shed some insight please?
    > >
    > > Thanks in advance,
    > > Richard

    >
    >
    >


  6. #6
    Bob Phillips
    Guest

    Re: Dynamic Entries

    Private Sub ComboBox1_Change()
    If ComboBox1.Value = "a" Then
    ComboBox2.RowSource = "A1:A10"
    Else
    ComboBox2.RowSource = "B1:B10"
    End If
    ComboBox2.ListIndex = 0

    End Sub


    --
    HTH

    Bob Phillips

    "Richard" <[email protected]> wrote in message
    news:[email protected]...
    > There is for example; combobox A where there are say 2 items. If Item #1

    is
    > selected, then Combobox B has say 10 items to choose from. If item #2 is
    > selected from combobox A, then combobox B has 7 items to choose from.
    >
    > Thanks,
    > Richard
    >
    > "Tom Ogilvy" wrote:
    >
    > > A userform? A worksheet made to look like a paper form? what do you

    mean by
    > > Form?
    > >
    > > How does the user make a choice?
    > >
    > > When you say a list will appear - you mean a listbox?
    > >
    > > The more detail you can describe, the more focused the answer will be.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > > "Richard" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > Hello,
    > > >
    > > > I am trying to make a form where there will be a choice between A and

    B.
    > > > Should option A be selected within the form, I need a list to appear -

    say
    > > > options 1-10; should B be selected, I need a different list to appear.

    > > Can
    > > > anybody shed some insight please?
    > > >
    > > > Thanks in advance,
    > > > Richard

    > >
    > >
    > >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1