[AccessD] A2K: Syntax - Manipulating a sub-subform?

Christopher Hawkins clh at christopherhawkins.com
Wed Apr 14 18:07:03 CDT 2004


First, the setup:

Form frmMain contains a subform object named sFrmFind.  sFrmFind's
SourceObject is frmFind.

frmFind contains a subform object named sFrmResults.  sFrmResults'
SourceObject is frmResults.

frmResults is a datasheet with fields such as FirstName, LastName,
etc.
 
Now, my question...once frmMain is open and showing me my subforms,
how do I change the .ColumnOrder of a field in frmResults from within
the Click event of a button on frmFind?

Forms!frmMain.sFrmFind.Form!sFrmResults.Form("FirstName").ColumnOrder
= 1 isn't doing it.
Me.parent.sFrmFind.Form!sFrmResults.Form("FirstName").ColumnOrder = 1
isn't doing it either.

I keep getting 'Application-defined or object-defined error' when
either of those lines try to execute.

I'm oviously overlooking some nuance of syntax.

If I'm true to form, I'll have "one more idea" and fix it immediately
after clicking 'Send' on this eMail.  But by all means, suggest some
syntax anyway.  :)

-Christopher-





More information about the AccessD mailing list