Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting a record from a sub-Form

Status
Not open for further replies.

CLOS

MIS
Jan 30, 2002
23
0
0
US
Need some urgent HELP on this one, please!

I have a form that contains a sub-form.
The main form contains a single record.
The sub-form contains multiple records of
the single record thats displayed on the main
form. Now, when the user clicks on a single record thats
found on the sub-form, I want the user's record selection
to pop-up or appear on the main form. How do I do that?
Please write the code that shows me how to do this process, Thanks.
 
This isn't a perfect answer, but it should get you on the right track.
Forms!frmForm1.lblBox2.caption=
Forms!frmForm1!subfrmForm2.Form.lstBox1.value

where frmForm1 is main form
subfrmForm2 is the subform
tstBox1 is a listbox control on subform
lblBox2 is a label on the main form

This code will put the subform listbox's value in the main forms label. I would put this under a on click procedure
for the listbox or after update procedure.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top