Sub Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to write a if statment to compare to fields. the one field is in a
subform. I was told to use the following:
[me!]subformcontrolname.form!controlname
Im not sure about the syntax, can u please help.
 
Your subform has a name as form, you can find it in the database window.
But when it is a subform on your form, it sits inside a control. Find
out the name of that control, and put this in the place of
<subformcontrolname> in the expression below.

the Me! part is optional, that is what I meant using square brackets.
Not the wisest choice of notation here, as square brackets are part of
the actual syntax inside Access as well.

If the first control for the comparison is text1, the subform control is
called subfrm1, and the second control (in that subform) is text2, the
comparing expression becomes

me!text1 = me!subfrm1.form!text2
I need to write a if statment to compare to fields. the one field is in a
subform. I was told to use the following:
[me!]subformcontrolname.form!controlname
Im not sure about the syntax, can u please help.
 
Back
Top