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!

Dynamic Subform

Status
Not open for further replies.

SERT1

Programmer
Sep 13, 2001
33
0
0
CA
Does anyone know how to create a dynamic subform? I have 3 queries that bring back different information. There is an option box to select what you want to see. i.e.

Qry 1: Date, # of Records
Qry 2: Date, FailType1, Failtype2, Failtype3
Qry 3: Date, FailType, Cost

What I would like to do, instead of creating 3 different forms and changing the subform's object source, I would like to change the subform's properties dynamically.

Is this possible?
 
IMO, the forms don't look sufficiently similar to warrant doing what you are asking.

You can write public functions that the form can share; or event use a class module to provide common functionality. Unfortunately, Access doesn't have intrinsic object inheritance (at least, not as of 2000).

I think you might be better served using a tab control for your purposes. The tabs would serve the same purpose as the option box.

Or, as a another tactic, you could create three overlaying sub-forms, two of which are disabled at any time.

However, if you do wish to carry on, of course it's possible. You would have to change the form's record source, on a control-by control basis change the control source, or change a control's visibility, format, possibly input mask, row source, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top