I have a form open with an Individual ID (autonumber). A button opens another form (frmNewPayment) in which i would like to add new payment. The frmNewPayment has a combo box with 2 columns (IndividualID, LastName). IndividualID column is bound and hidden. I want to set value in the combo box to the Last Name matching the ID from the main form using vba - how can I do that?
I tried the following:
..but that gives me an error: "you can't assign a value to this object."
So I guess in short: How can I set value (preselect a row) using VBA for a combo box?
I tried the following:
Code:
Me.IndividualID = Forms![frmIndividuals]!IndividualID
or
Me.IndividualID.value = Forms![frmIndividuals]!IndividualID
..but that gives me an error: "you can't assign a value to this object."
So I guess in short: How can I set value (preselect a row) using VBA for a combo box?