Solved

How refer to subform field from main form code

Posted on 2014-03-12
2
411 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

739 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