Referencing subforms

Davros

Registered User.
Local time
Today, 13:47
Joined
Sep 9, 2005
Messages
131
hi

this is not so much a question as i know the answer. what i don't understand is why the reference i use to reference a recordsource in a subform from another form is not listed here:

http://www.mvps.org/access/forms/frm0031.htm


my code copies text from one form to another and this is the code i use to reference the subform:

[Forms]![frm_inspections]![que_inspection_details]![Item_Ref]

in essence:

[forms]![main form]![sub form]![recordsource]

what i don't understand is why the document in the link above which a lot of people on this site recommend does not show the above code. am i missing something?
 
Interesting. I always wondered why subformcontrols had no default property but now I see they do. I have looked in vain for the default because I never anticipated that it encompassed two levels and the usual unseen automatic substitution of the dot with the bang as required is not performed.

The default property of the subformcontrol is:
.Form.Recordset

Code:
Forms!mainformname!subformcontrolname!fieldname
refers to:
Code:
Forms!mainformname!subformcontrolname.Form.Recordset!fieldname.Value


Thanks for that one Davros. Another mystery revealed.
 
Last edited:
finally
I've been of some help :D
 

Users who are viewing this thread

Back
Top Bottom