Sub Form

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.
 
B

Bas Cost Budde

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top