Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Aug 2006
    Location
    Capital Federal, Argentina
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Changing the RowSource of a list pressing Returnk? (2k)

    Hi all,

    I need to change the RowSource of a ListBox when I change the value of a ComboBox.
    I tried ComboBox.Change event and it worked only when I click the left button -mouse- to change the value, but it didn't work when I used the keyboard (meaning pressing Return key).
    How can I make it work when I use the Return key to change the value?

    Thanx,

    Mat&

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

    Re: Changing the RowSource of a list pressing Returnk? (2k)

    Try using the After Update event of the combo box.

  3. #3
    New Lounger
    Join Date
    Aug 2006
    Location
    Capital Federal, Argentina
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Changing the RowSource of a list pressing Returnk? (2k)

    Hi Hans,

    Thanks for the response, but I tried AfterUpdate, Enter and Change but nothing happened.
    Perhaps it's the way I'm using them.

    i.e.
    <code>
    Private Sub ComboBox_AfterUpdate()
    Call "FUNCTION THAT CHANGE THE ROWSOURCE USING ComboBox.Value"
    End Sub

    Private Sub ComboBox_Enter()
    Call "FUNCTION THAT CHANGE THE ROWSOURCE USING ComboBox.Value"
    End Sub

    Private Sub ComboBox_Change()
    Call "FUNCTION THAT CHANGE THE ROWSOURCE USING ComboBox.Value"
    End Sub
    </code>

    I think the problem could be with the ComboBox.Value, because when I left-click the Box it works, but when I press the Return key it doesn't.

    Thanx in advance,

    Mat&

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

    Re: Changing the RowSource of a list pressing Returnk? (2k)

    We'll have to see the database in order to investigate what's wrong. Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  5. #5
    New Lounger
    Join Date
    Aug 2006
    Location
    Capital Federal, Argentina
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Changing the RowSource of a list pressing Returnk? (2k)

    Dear Hans,

    I was working with an adp file. While trying to reduce the database and forms to make a small mdp, I found the solution:
    When I ran the function, the value of the last combobox was 'null'. Then I add the event Change and It work OK.
    Now I'm using both Change and AfterUpdate for each Combobox.

    Thanx,

    Mat&

Posting Permissions

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