Consulting

Results 1 to 3 of 3

Thread: Update ComboBox

  1. #1
    VBAX Regular
    Joined
    Jul 2018
    Posts
    17
    Location

    Update ComboBox

    I have a very simple form based on a Query.

    It has a ComboBox to select records and displays a few fields from the Query corresponding to the ComboBox selection.

    At the bottom of the form is the built-in Record Selector. If I use this to scroll through the records, the fields update accordingly but the ComboBox does not.

    This is problem because the value in the ComboBox is used for some other operations.

    Is there a way to update the ComboBox when scrolling through the records, as above ?

    Thanks

    Martin

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    In the Form's "On Current" Event Procedure enter the followingVBA Code

    If Not Me.NewRecord Then Me.Combo_Name_goes_here = Me.field_name_goes_here

    Where the field name is the field that your combo uses to find the required record.

  3. #3
    VBAX Regular
    Joined
    Jul 2018
    Posts
    17
    Location
    Perfect ! Thank you.

Posting Permissions

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