VB Coding - Combo Box Auto Populate Error - Trying to select an item in a combo box t

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • morganaj
    New Member
    • Oct 2013
    • 12

    VB Coding - Combo Box Auto Populate Error - Trying to select an item in a combo box t

    Hello,

    I am trying to get it so on after an update of a combo box that three other fields are to be filled in.

    I have the Control Source set to the Primary Key field of the table for the Contact.

    With the Row Source Type set to Table/Query. It is based off a query with the first field in the grid the primary key.

    I have set the properties to:
    Bound Column should be 1
    Change to Format Tab
    Column Count is 6
    Column Widths are 1.5”;1”;0”;0”
    List Width is 3”

    I have added a "Click on Event" VB with the following code.
    ------
    Code:
    Private Sub Combo4_AfterUpdate()
    Me![Toll Free] = Combo4.Column(1)
    Me![Phone Number] = Combo4.Column(2)
    Me![E-Mail] = Combo4.Column(3)
    End Sub
    ------

    And when I try to use the form I get either an error message or it just doesn't work, and I'm confused as to why.

    I appreciate any help/advice that people have to offer my conundrum.
    Last edited by zmbd; Oct 9 '13, 05:35 PM. Reason: [Rabbit{Please use [CODE] and [/CODE] tags when posting code or formatted data.}][z{placed [/code] tag at end of block}]
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    And when I try to use the form I get either an error message or it just doesn't work, and I'm confused as to why.
    Please post the EXACT title, number, and text of the error message. Please do not alter, omit, nor abreviate the information provided in the error message.

    Please post the SQL that is the rowsource for the combobox. Please format the posted SQL by selecting the text and clicking on the [CODE/] format button.

    Please be more specific as to what isn't working? Simply telling us it "doesn't work" isn't helping us to help you.

    Beaware that the Column() property is a "zero" order value. That is to say, the first column would be referenced by me.controlname. column(0)

    Comment

    Working...