Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    combo box update (Acc2002 W98 Sr2)

    I have a form with an unbound combo box that selects the record displayed in the form. I have VBA code in the combo box's Open and Update events that selects the initial record (on opening the form) and changes to the selected record (on Update) when one is selected from the combo box. However, if I select a record without using the combo box (PgDn or whatever) the combo box display doesn't change.

    How can I get the combo box display updated to the current record?

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

    Re: combo box update (Acc2002 W98 Sr2)

    You can add code to the OnCurrent event of the form to update the combo box.

    Try something like

    Private Sub Form_Current()
    ' Other code goes here
    [cboSelectActivity] = [ActivityID]
    End Sub

    (where ActivityID is the field corresponding to the first column in the combo box)

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: combo box update (Acc2002 W98 Sr2)

    Thanks Hans,

    That did the trick! <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>

Posting Permissions

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