data from list box to subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have a list box containing dishes which the user selects. i need some sort
of code which when one data item is double clicked it sends the dish number
into a subform on the form itself. i need this to happen to enable processing
of receipts.
 
On the double-click event of the list box i would enter the following code.

Me!subfrmName.Form!txtDishNumber = Me!lstListBox.Column(0)

This assumes that:
- The subform is in the same form as the listbox
- The dish number is in the first column of the listbox
- The listbox is call lstListBox
- The subform is called subfrmName
- The field to populate in the subform is called txtDishNumber

Hope this helps.
 
Back
Top