Check boxes and user names in forms

T

TobyR

<Moderators please delete - post worked first time round!> MS Word 200
help has a good section on how to create a form with check boxes (usin
legacy controls) but I would like to do something a little more complex
namely having fields next to the checkbox which update with the th
username of the person setting the check box and the date the check bo
is set. Is this possible? Any advice or suggestion gratefull
received
 
D

Doug Robbins - Word MVP

See response to your original post.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
T

TobyR

Indeed, I did post a second time when I thought my first post didn't
work - sorry for the confusion. But to reiterate my last question,
would I have to create a separate macro for each checkbox/text-field
grouping? If so, is there some way to avoid this as I have in mind a
form with about 50 check boxes.
 
D

Doug Robbins - Word MVP

How do you have all of the checkboxes and other formfields arranged?

If they each checkbox and the Name and Time text formfields associated with
it were all in a one row of a table in the order Checkbox, Name formfield,
Time formfield, then you should be able to use the following code on exit
from each of the check boxes

With Selection.Rows(1).Range
If .FormFields(1).CheckBox.Value = True Then
.FormFields(2).result = Application.UserName
.FormFields(3).result = Format(Now, "yyyy-mm-dd -
hh:MM:ss")
Else
.FormFields(2).result = ""
.FormFields(3).result = ""
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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