Passing a number from a combo box to a text box in another form

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

I'm new, learning, and have hit a snag. Thanks for your help.

All I want to do is to pick a number from a combo box and send it to a
text box in a different form.

FrmSource is unbound. It has a combo box, cboNumber, that lists
choices from tblNumber.

FrmDestination is unbound and has text box - txtNumber.

I want to click on a number in cboNumber and have FrmDestination open
and that number appear in the txnNumber field.

Thanks for any assistance.

Jon
 
In the After Update event of the combo box, use docmd.openform ... to
open frmDestination

Then in the second form, in the on open event, put
me![txtnumber]=forms![form1].cbonumber

This will work if:

form1 remains open, and
the bound column of the combo box in form1 is the number you want.

Hope this helps

John
 
John, That works great. Thank you for your help.

J. Goddard said:
In the After Update event of the combo box, use docmd.openform ... to
open frmDestination

Then in the second form, in the on open event, put
me![txtnumber]=forms![form1].cbonumber

This will work if:

form1 remains open, and
the bound column of the combo box in form1 is the number you want.

Hope this helps

John

I'm new, learning, and have hit a snag. Thanks for your help.

All I want to do is to pick a number from a combo box and send it to a
text box in a different form.

FrmSource is unbound. It has a combo box, cboNumber, that lists
choices from tblNumber.

FrmDestination is unbound and has text box - txtNumber.

I want to click on a number in cboNumber and have FrmDestination open
and that number appear in the txnNumber field.

Thanks for any assistance.

Jon
 
Back
Top