Irshad, There's a lot of ways to do this but I suggest to put your check boxes condition on a separate procedure and call them on New, First, Previous, Next and Last Event or on Form_Current Event.
HTH -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of Irshad Jamal Sent: Thursday, October 20, 2005 1:46 PM To: [email protected] Subject: [AccessDevelopers] Hiding and showing controls Dear Users, I have an Operator form containing 2 check boxes and 3 textboxes with associated labels. 1) chkPersonnellTrained, if it is checked I want the Date trained label and textbox to show, if the checkbox is unchecked then the label and textbox should remain hidden. 2) chkFormalContract, it is checked I want the intial and final date of contract labels and textboxes to show, the same for this box. I want this to be valid for each record in the table, as you navigate from record to record on the form. I have put the following code in the load event of the operator form: If chkPersonnellTrained.Value = 1 Then lblDateLastTrained.Visible = True txtDateLastTrained.Enabled = True ElseIf chkPersonnellTrained.Value = 0 Then lblDateLastTrained.Visible = False txtDateLastTrained.Enabled = False End If If chkIsContract.Value = 1 Then lblInitialContractDate.Visible = True txtInitialContractDate.Visible = True lblFinalContractDate.Visible = True txtFinalContractDate.Visible = True ElseIf chkIsContract.Value = 0 Then lblInitialContractDate.Visible = False txtInitialContractDate.Visible = False lblFinalContractDate.Visible = False txtFinalContractDate.Visible = False End If End Sub The labels and textboxes only appear and dissapear when I check the box for each record in the form manually, it does not happen automatically on startup when a new record is being entered. Any help on this will be much appreciated. Thank you. Irshad __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ Please zip all files prior to uploading to Files section. Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/q7folB/TM --------------------------------------------------------------------~-> Please zip all files prior to uploading to Files section. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AccessDevelopers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
