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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check box Code Problem 1

Status
Not open for further replies.

stazza18

IS-IT--Management
Jun 1, 2004
25
US
I have a piece of code for a checkbox on a form that disables certain fields when checked. The problem I am having is that when I click on the check box and disable these fields, when I go to the next record the boxes are already disabled. I can't figure out how to set the boxes to enabled whenever the next record comes up. Here is the code I put in if it helps:

Private Sub DVR_ERROR_Click()
'This will disable the Pulled section

If DVR_ERROR.value = True Then
Completed_By.Enabled = False
txtDate.Enabled = False
Turnaround.Enabled = False
VIDEO_PULLED.Enabled = False
Video_Not_Pulled.Enabled = False
Reason.Enabled = False
Video_Description.Enabled = False
Else
Completed_By.Enabled = True
txtDate.Enabled = True
Turnaround.Enabled = True
VIDEO_PULLED.Enabled = True
Video_Not_Pulled.Enabled = True
Reason.Enabled = True
Video_Description.Enabled = True
End If

End Sub
 
How about using the OnCurrent Event?

Something like:

Private Sub Form_Current()
Completed_By.Enabled = True
txtDate.Enabled = True
Turnaround.Enabled = True
VIDEO_PULLED.Enabled = True
Video_Not_Pulled.Enabled = True
Reason.Enabled = True
Video_Description.Enabled = True
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top