Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / July 2005

Tip: Looking for answers? Try searching our database.

Sub Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Darren - 27 Jul 2005 12:49 GMT
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.
Alex Dybenko - 27 Jul 2005 14:35 GMT
try:
me.subformcontrolname.form!controlname

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

>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.
Bas Cost Budde - 27 Jul 2005 14:52 GMT
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.

Signature

Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
For human replies, replace the queue with a tea

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.