Solved

Subform and checkbox reset

Posted on 2004-09-14
2
278 Views
Last Modified: 2006-11-17
I have a checkbox on a form that when a user marks or checks, a pop-up subform is made visible.  I need to know how to code the following:
 
a)  reset the checkboxes on the main form and the subform when the user exits the particular record or go to the next record (i.e. uncheck all boxes).

Currently, I have the following code for the
Private Sub MyCheckbox_AfterUpdate()
 If Me.MyCheckbox.Value = True Then
      Me.MySubform.Visible = True
       
      End If
End Sub
0
Comment
Question by:emacyam
2 Comments
 
LVL 3

Accepted Solution

by:
domj earned 100 total points
ID: 12061793
The 'on Current' event is the one that you want (Form_Current()). Set your checkboxes to False on this event and they will reset every time a new record becomes Current Record.

Dom
0
 
LVL 11

Assisted Solution

by:Mighty_Silly
Mighty_Silly earned 50 total points
ID: 12071232
The code for resetting the check box would be placed on the form's On_Current event as Dom mentioned:

 Me!MyCheckbox = false   ' This forces the chkbox to false
 Me!MySubform.Visible = false  ' This forces sub-form to be invisible

You didn't mention any other validation so the above will Blank out the check box and make subform invisible EVERYTIME you move off the current record (by going to the next record or new record.)

Hope this helps!
-Silly-
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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

910 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

22 Experts available now in Live!

Get 1:1 Help Now