OnCick Code

  • Thread starter Thread starter Bob V
  • Start date Start date
B

Bob V

If I have 2 Combo Boxes on the same form
cmbSource
cmbTarget
What code do I need in OnClick in cmbSource to send any data in that combo
to cmbTarget
Thanks for any help..................Bob
 
me.cmbTarget.additem me.cmbSource.text

cmbTarget's data type must be list.
 
Thanks Lance, But I should have thought before I posted, it is actually a
control in a Subform that I want to click to send date from
cmbSource(SubForm) to cmbTarget...............Thanks for
helping............Bob
 
Thanks Lance
Private Sub cmdEnterPay_Click()
Forms![frmAccountStatus]![tbModeOfPayment].AddItem
Me.ModeOfPaymentChild.Text
End Sub
I am getting this error:
"You Cant reference propety or Methord for a Control unless the control has
the focus"
Thankds for helping .....Bob

Lance said:
Forms![<<<MAIN FORM NAME>>>]![cmbTarget].AddItem Me.cmbSource.Text

Bob V said:
Thanks Lance, But I should have thought before I posted, it is actually a
control in a Subform that I want to click to send date from
cmbSource(SubForm) to cmbTarget...............Thanks for
helping............Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top