• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 325
  • Last Modified:

Enable text box when a check box has been clicked

I have a form that has a check box and a text box on it.  When I click on the check box I want the text box to be visible.  Conversely, when the check box in unchecked, I want the text box to not be visible.  I am using the attached code to accomplish this.  The problem I'm having is that when I click on the check box for one record, the text box becomes visible for all subsequent records.  How do I make this work for each record independently?
Private Sub PI_Click()
If PI.Value = 0 Then
PI_Adj.Visible = False
Else
PI_Adj.Visible = True
End If

Open in new window

0
cobianna
Asked:
cobianna
  • 5
  • 5
1 Solution
 
Rey Obrero (Capricorn1)Commented:
so, you have a continuous form.
you have to bind the checkbox to a yesno field in your table.
0
 
cobiannaAuthor Commented:
Actually, it's a single form.  I am pulling the check box from a yes/no field in my table.
0
 
Rey Obrero (Capricorn1)Commented:
oh. also use the current event of the form to check the status of the check box

private sub form_current()

me.PI_Adj.visible=me.PI.value

end sub
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
cobiannaAuthor Commented:
I tried that.  I'm still having the same issue.
0
 
Rey Obrero (Capricorn1)Commented:
can you attach your db?
0
 
cobiannaAuthor Commented:
I can't.  It contains sensitive information.  Sorry.  
0
 
Rey Obrero (Capricorn1)Commented:
then, remove the sensitive information...
0
 
cobiannaAuthor Commented:
It's not that easy.  I have several ODBC drivers linked into the db.  I will see if there is a way for me to manipulate those tables with mock data.  It's going to take a while but I will see what I can do.
0
 
Rey Obrero (Capricorn1)Commented:
just use a local table with dummy data
0
 
cobiannaAuthor Commented:
Capricorn1,
It's working now.  I'm not sure what happened but it works.  Thanks.
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now