Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent Question about Form Fields Check Box

Status
Not open for further replies.

Netooi

Programmer
May 15, 2002
29
US
Hi, I'm working with firing a macro when a form field Check box is checked in Microsoft word....

It has the On Enter and On Exit options to fire the macro...

My problem is it fires the first time you click on the check box (On Enter)
it fires when you leave the checkbox to click on another form field (On Exit)

I need it to fire if they change the value of the checkbox a couple times without entering from another form field or exiting to another form field.

Is this possible?? And i need to know as quick as possible for a deadline i have to meet.

If anyone can help many thanks,
Netooi
 
When I use Word I can find the event AfterUpdate which is really what you should use. The code below toggles a control.

Private Sub CheckBox1_AfterUpdate()

Me.txtMyControl.Visible = Me.CheckBox1

End Sub ----------------------
scking@arinc.com
Life is filled with lessons.
We are responsible for the
results of the quizzes.
-----------------------
 
scking: The problem is that Netooi is using Word form fields, not a UserForm with all the comfort of the VBA Editor.

Netooi: I have a similar problem, although mine is that Word crashes. Still it means that using form fields and macros that start when I leave are no good.

I am using a button that the people press after they have gone through the whole form (or in the middle, as they wish) It isn't the most elegant solution, but it works.

Now I am thinking of adding the functions you are doing, which is to make question appear or disappear when a check box is checked, not at the end. To this end I am investigating the other toolbar with option fields, check boxes etc. (No idea what it is called in English)

Good luck :)

Carol
Berlin, Germany
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top