Solved

Subform and checkbox reset

Posted on 2004-09-14
2
280 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
[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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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 …

761 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