Textbox code for list of post

  • Thread starter Thread starter Highlight between 3 fields
  • Start date Start date
H

Highlight between 3 fields

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.
 
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!
 
Back
Top