A variable number of instances of a subform

Richard1941

Registered User.
Local time
Today, 15:02
Joined
Oct 29, 2012
Messages
34
I have a subform that formats the data in a record in a particular 2D way. I want to use it a variable number of times on a single form. Is there any way to do that? I've tried using CreateControl, but access just says it can't add the controls I've requested -- with no reason given, of course.
 
That can only be done, one way at a time. Add a control, maybe a combo box, on the sform (header) on on th main form to select the display wanted, then reformat it accoudingly; maybe even select different subform control sources for different subforms having the desired format.
 
Adding controls during runtime is not a viable technique.

Include as many subformcontrols as you will ever need and use the Visible property to show the desired number at runtime.
 

Users who are viewing this thread

Back
Top Bottom