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!

Access does not allow to create a c 1

Status
Not open for further replies.

gc

MIS
Mar 8, 2001
68
US
Access does not allow to create a continuous form contains
a continuous subform. I want to create this kind of the form which can add / edit data. Is there any way to make it?
Thank you very much for your help?
George
 
Yes, easy enough to do.

(a) Create a main form
(b) Create your two other forms
(c) Place each of the other two forms as continuous subforms on the main form.
(d) Create a hidden text control on the main form, and set its controlsource equal to key field of the "controlling subform". Do this for as many fields comprise the identifying fields on this subform.
(e) Set the link master fields of the second "controlled" subform to equal the hidden fields on the first subform.

This should do the trick. You may be able to sync the two subforms directly without the intermediate main form fields, but I use this technique as in fact it allows you to chain subforms for more than two levels.

Hope that this all makes sense,
Cheers,
Steve
 
Thanks for your quick response Steve, how do I set the value in the textfield on the main form to the control on subformform a, please note that subform a is a contineous form - supose my main form is [main form] subform a is [a] and subform b is , I created a textbox on main form and set its controlsource property as under:

=[Forms]![main form]![a].[Form]![id]

That does not populate the textitem !

Please help!

Thanks
Mike
 
Mike,

Your code looks OK to me. One thing to check; the text field on the main form references the NAME property of the subform, not the SourceObject property. To keep things simple, I nearly always make sure that they are the same. Make sure that in your example, the name property of the embedded subform is also set to "a"

Hope this helps; gotta go,

Cheers,
Steve
 
Hi! Steve,
Thank you very much for your quick response.
Is the main form unbound? or is it same as first subform?
(the second subform is the childform of first subform).
George
 
George,
The main form could be unbound, or bound depending on your requirement. There is certainly no reason that it should be bound the same as the first subform. In your case though it sounds like it would be unbound, and you would do your navigation via the first subform.
Cheers,
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top