• synchronize 2 controls on a form

    Author
    Topic
    #355986

    How to synchronize two controls on a form

    I have a combo box to look up the CompanyName by typing the name of the customer.To this end the column width for the ID number is set to 0. It works fine however I want also that the Customer ID number is also shown,and if I do not set the ID number to 0, than I cannot look up by typing. To evade this problem I have put a second control on the form called CID and I want by coding to syncrhonize the two controls. Is there any possibility to synchronize the two controls ?

    Viewing 0 reply threads
    Author
    Replies
    • #526221

      If the bound column of the combo box is the column containg the ID you can use something like

      me.CID = me.cboCompanyName

      in the click event of the CompanyName combo box.

      You can also refer directly to the column conating the ID

      me.CID = me.cboCompanyName.column(0)

      where the “0” is the column index of the ID field.

      Hope this helps.

      Richard Aheron
      raheron@hotmail.com

    Viewing 0 reply threads
    Reply To: synchronize 2 controls on a form

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: