hide or unhide a control depending on the result of another

L

LiquidWrench

I have developed a form that allows the user to append the current record to
one of two tables depending on whether or not the steps are complete. The
determining factor are some check boxes placed on the form I have also placed
2 cmd buttons for each check box. The first allow the user to actually
append the record to the appropriate table and the second allowing the user
to delete the same record from the current table, therefore moving the record
to the appropriate table ie completed or incomplete. What I want to do is
hide the first command button until the checkbox is selected and keep the
second command button hidden until the first button is pressed. I know this
is done in the OnClick event but not sure of the code.
Can some help please.
 
D

Damon Heron

Private Sub Chk1_Click() 'your checkbox
Me.Cmd1.Visible = Me.Chk1
Me.Cmd2.Visible = False
End Sub

Private Sub Cmd1_Click() 'your first command button
Me.Cmd2.Visible = True
End Sub
 

Ask a Question

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.

Ask a Question

Top