Solved

How refer to subform field from main form code

Posted on 2014-03-12
2
406 Views
Last Modified: 2014-03-12
I have this code in an onclick event of a checkbox on a main form...

If Me.chkbxGrowDay1Selected = True Then
       Forms!frmPlanted!subfrmReady.txtReadyDate = Me.txtplantdate + Me.txtGrowDaysCalc
    End If

 but it doesn't seem to like the line...

 Forms!frmPlanted!subfrmReady.txtReadyDate = Me.txtplantdate + Me.txtGrowDaysCalc

What is wrong with the syntax?
0
Comment
Question by:SteveL13
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 39923348
assuming that "subfrmReady" is the name of the subformcontrol


 Forms!frmPlanted!subfrmReady.FORM!txtReadyDate = Me.txtplantdate + Me.txtGrowDaysCalc
0
 

Author Comment

by:SteveL13
ID: 39923361
Thanks.  That syntax seems to be ok.  But now a new issue and I can award this solution and ask another question.  Please watch for question titled "How update all records in a subform"
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now