Avatar of SteveL13
SteveL13Flag for United States of America

asked on 

How update all records in a subform

I have a main form that has a checkbox and the onclick event of the checkbox is:

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

But when the checkbox is clicked only the first record in the subform on the main form is updated.  I need all records in the subform to update.

How do I get that to happen?  It's almost like it has to loop through the records in the subform but I don't know how to make that happen.
Microsoft Access

Avatar of undefined
Last Comment
SteveL13
ASKER CERTIFIED SOLUTION
Avatar of Jim Dettman (EE MVE)
Jim Dettman (EE MVE)
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of SteveL13
SteveL13
Flag of United States of America image

ASKER

This worked:

 Execute an update query and then requery the form
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo