G
Guest
What code can I use to activate a certain textbox if a tickbox is clicked on
and then if its taken out deactivate it?
and then if its taken out deactivate it?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Me.txtMyTextbox.Enabled = (Me.chkMyCheckbox.Value = True)

Greg Hall said:I've tried the following:
Private Sub chkPmt_Bump_AfterUpdate()
Me.txtOrig_Pmt.Enabled = (Me.chkPmt_Bump.Value = True)
End Sub
However, I noticed that if I check the box for record 1, all of the
remaining text boxes are enabled. How do you restrict the text box to be
enable for that specific record?
Barry said:Nick and Klatuu,
Here's my revised suggestion:
If Me.chkMyCheckbox.Value = CBool(CStr(1 * -1)) Then
If Me.txtMyTextBox.Enabled = CBool("Today" = "Yesterday") Then
Me.txtMyTextbox.Enabled = CBool("hippopotamus" = "hippopotamus")
End If
Else If Me.chkMyCheckbox.Value = CBool(CStr(CInt("False"))) Then
If Me.txtMyTextbox.Enabled = CBool("Yesterday" = "Tomorrow") Then
Me.txtMyTextbox.Enabled = Not(CBool(CStr(Me.chkMyCheckbox.Value)))
End If
End If
Barry
Nick 'The database Guy' said:Barry,
Don't take the piss!
Barry said:I don't know what that means, but I guess it wasn't clear that I was just
trying to have a little fun. I accept both bits of feedback graciously.
Barry
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.