Solved

How refer to subform field from main form code

Posted on 2014-03-12
2
408 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

815 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

7 Experts available now in Live!

Get 1:1 Help Now