From: Highlight between 3 fields on 16 Mar 2010 04:37 Hello I have Form name "Jamforelse" and inside this form contain post list. And one of the post is Bounden box and on this box code as the folowing: =getnum(Forms("Jamforelse"),"e",[e]) This code work correct when I open Form name "Jamforelse", but when I add this form "Jamforelse" inside another form that have name "form2" then this code =getnum(Forms("Jamforelse"),"e",[e]) not work. I try to change on it as the folowing, but didn't work =getnum(Forms("form2"!"Jamforelse"),"e",[e]) =getnum(Forms("form2!Jamforelse"),"e",[e]) Any idea I appreciate.
From: John W. Vinson on 16 Mar 2010 12:19 On Tue, 16 Mar 2010 01:37:01 -0700, Highlight between 3 fields <Highlightbetween3fields(a)discussions.microsoft.com> wrote: >Hello > >I have Form name "Jamforelse" and inside this form contain post list. >And one of the post is Bounden box and on this box code as the folowing: > > =getnum(Forms("Jamforelse"),"e",[e]) > >This code work correct when I open Form name "Jamforelse", but when I add >this form "Jamforelse" inside another form that have name "form2" then this >code > =getnum(Forms("Jamforelse"),"e",[e]) >not work. > >I try to change on it as the folowing, but didn't work > =getnum(Forms("form2"!"Jamforelse"),"e",[e]) > =getnum(Forms("form2!Jamforelse"),"e",[e]) > >Any idea I appreciate. The syntax for referencing a field on a Subform requires that you use the main form. A subform is not part of the Forms collection; it can only be accessed using the name of the mainform and the Subform Control on the mainform: =Forms![NameOfMainform]![SubformControl].Form![Textboxname] or Forms("mainformname").Controls("SubformControl").Form.Controls("textboxname") should work, though I've never seen that syntax used. Could you post the code in your Getnum function? It seems to be a rather complicated way to do something which might be much simpler! -- John W. Vinson [MVP]
From: Highlight between 3 fields on 17 Mar 2010 10:09 Thank you very much for helping
|
Pages: 1 Prev: Issues Displaying results in Combo Box in Access 2003 Next: Global value |