text area pre filled if check box is on

R

ryddogop

Hey


I have a form with a text area where users can submit there comment.
In the form I also have a check box, and when tis is on the text area
should be pre filled with a text. The text area should till be able to
edit before submit.

How do I make this possible?

Thanks for your suggestion.


Ryd.
 
R

ruralguy via AccessMonster.com

You may have to describe what you want a little better. As it stands now it
could be that when you check the CheckBox, you fill the Text area with words
from the dictionary. Where do you expect the text to come from?
 
J

John W. Vinson

Hey


I have a form with a text area where users can submit there comment.
In the form I also have a check box, and when tis is on the text area
should be pre filled with a text. The text area should till be able to
edit before submit.

How do I make this possible?

You can use some VBA code in the Afterupdate event of the checkbox like:

Private Sub chkMyCheckbox_AfterUpdate()
If Me.chkMyCheckbox = True Then
Me.txtComments = "blah blah blah, the stuff you want it to say"
End If
End Sub

Note that this will blindly overwrite any existing comment; if you want
already entered comments left alone use

If Me.chkMyCheckbox = True And IsNull(Me.txtComments) Then


John W. Vinson [MVP]
 
R

ryddogop

You can use some VBA code in the Afterupdate event of the checkbox like:

Private Sub chkMyCheckbox_AfterUpdate()
If Me.chkMyCheckbox = True Then
Me.txtComments = "blah blah blah, the stuff you want it to say"
End If
End Sub

Note that this will blindly overwrite any existing comment; if you want
already entered comments left alone use

If Me.chkMyCheckbox = True And IsNull(Me.txtComments) Then

John W. Vinson [MVP]




Hey John

Many thanks for your help.

Ryd
 
Top