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

Choosen Forms based on List box Update

Status
Not open for further replies.

claims

Technical User
Feb 8, 2005
6
US
I have a main form frmItemDetail (source: tblItem) on which I created a List box (ValveList, which is stored in tblItem.Type). Based on the values in this list, I want to display the form that corresponds to the value I select as a subform in frmItemDetail.

Values in List box -> forms to display as subform
--------------------------------------
Resilient Seated -> frmPartsRSBVSUB
High Performance -> frmPartsHPBVSUB
Rotary Process -> frmPartsRPVSUB
Ball -> frmPartsBallSUB

All 4 of these forms have same source (tblPartsWORKING), they are just a combination of different fields from the same table.

How can I get the chosen form to showup as a subform and populate the field tblPartsWORKING.ItemID with the corresponding tblItem.ItemID to link these records?

Thank You.
 
I think you're thinking too hard. Why not make 4 subforms on the main form. Hide them all.
At the afterupdate event of the listbox, you show/hide the form you want.

Is this what helps? If not; what's the problem?

grtz Flippertje
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top