Solved

How refer to subform field from main form code

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

760 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

19 Experts available now in Live!

Get 1:1 Help Now