PDA

View Full Version : Another Newb Problem



duffdiggler
03-15-2006, 12:04 PM
I have a form that has a text box, a "task complete" check box, and a input text box

check box = cbTaskComplete
input text box = txtlines

What I want to do is when the user clicks on the check box, have the input text box become grayed out or just not visible.

This is the code that I have tried but does not seem to work.


Selection.Style = "Normal"
If frmProcedure.cbTaskComplete.Value = True Then
frmProcedure.txtLines.Visible = False
Selection.TypeParagraph
Selection.TypeParagraph
Call Task_Completed
End If


When I click on the check box nothing happens to the other one.

That code is under a printprocedure() too. I don't know if that matters or not.

Here is the Task_Completed code too


Sub Task_Completed()
Selection.Style = "task completed"
Selection.TypeText Text:="Task Completed_________________ "


End Sub

mdmackillop
03-15-2006, 12:47 PM
Private Sub cbTaskComplete_Click()
If cbTaskComplete = True Then
frmProcedure.txtLines.Visible = False
Selection.TypeParagraph
Selection.TypeParagraph
Call Task_Completed
Else
frmProcedure.txtLines.Visible = True
End If
End Sub

duffdiggler
03-15-2006, 01:01 PM
Thanks again for the help. Really appreciate it. I have another question though.

Let's say the user inputs something into the text box. The nubmer 25 for instance. Then they click on the checkbox which makes the input box disappear. Then they, for some reason, uncheck the box to input another number. My question is how to clear that Input Box once is has become Invisible so they have a fresh box to input a number.

duffdiggler
03-15-2006, 01:08 PM
I got it on my own

txtLines.Text=""