Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSAccess check box

Status
Not open for further replies.
Sep 10, 2005
40
US
How do I use a check box to make a date text box appear when the check box is clicked on to select it. I have developed a membership database for a church but they would like a record of deceased members by clicking on a check box and having a date box appear to enter their date. The date box does not appear until you check the box. I already have the checked box done and it is labeled "deceased". What is my next move? Thanks in advance.
 
Hello:

The place the below code under the AfterUpdate event of a check box titled chkDeceased. Also make a text box named txtDate and set its visible property to no, (hidden). This text box must be bound to your deceased field date in your table. Checking the check box will make the date text box visible. Unchecking the check box will make it invisible again.
'
Private Sub chkDeceased_AfterUpdate()
If chkDeceased = True Then txtDate.Visible = True
If chkDeceased = False Then txtDate.Visible = False
End Sub
'
Regards
Mark
 
It worked but when the database is closed the date box disappears and I have to uncheck the deceased checkbox and recheck it to make it visible again. Is there anyway to make it stay visible after you check it, until unchecked.
 
In the Current event procedure of the form:
txtDate.Visible = chkDeceased

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top