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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a subform to display a selection list of records

Status
Not open for further replies.

Hammondo

MIS
Jan 14, 2002
23
NL
Scenario. You have a table holding a list of companies. On a subform, you want to display a list (filtered or not) showing just the company name of the companies in that table. (kind of a quick list that a use can scroll down).
The user should then be able to select/highlight a company from that list and the full details of that record be displayed on either the main form or another subform...

Does anyone have any ideas how I might achieve this? If so, I'd be eternally thankfull!

 
1) On the main form, put a hidden text box, e.g. KeyValue, to hold the key value from the selected subform record.

2) On the subform, use its OnCurrent event to copy the selected key (e.g. Me!KeyValue)to the Parent!KeyValue text box.

3) If the details are given in another subform, have that subform control on the main form link to the Parent!KeyValue text box. The subform will requery automatically when the link field changes.

4) If the details are given on the main form, code a special function on the main form to populate the display fields, and execute that main (parent) form function from the subform's OnCurrent event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top