Trouble with Fill-In fields in Word 2002

J

John

I have a word document that is heavily formated including
tables with formating. I am using fill-in fields to prompt
for specific information. I have a table set up with 6
rows for information. Each row asks for the same
information so the table can hold 6 rows of data for 6
different items. However, we do not always need to enter
that much information so most of the time it is only 1 row
of information that is being entered. Right now I have the
table set up to prompt for each formated cell, which equals
36 prompts for information. This is a bit much when you
only need to enter information in 6 of the prompts.
I would like to find a way to opt out of the other prompts.
I thought a "skip" command would work or "if" but it did
not seem too. I was thinking that I could have a box ask
for how many items there are to enter and then have Word
automatically know to prompt for that many that items.
After that, it would skip down to a comments section. I
hope I have made this clear.
can anyone help me figure this out?

I can clarify further if I need too.
 
D

Doug Robbins

I hate fill-in fields. Did I tell you I hate fill-in fields.

I would use a userform with a listbox and six textboxes one for each piece
of data and a command button that the user would click when they have
completed entering the data for one record and it would then add that record
to the listbox and ask if they wanted to enter the data for another record.
If they said "Yes" they would be returned to the first textbox ready for
them to enter more data. I they said now, the records from the Listbox
would be entered into the document. With this approach, there is no limit
to the number of records that can be entered and you only enter as many as
you need.

To get started, see the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.


Hope this helps,
Doug Robbins - Word MVP
 
J

John

Thanks for the reply. I used Fill-In fields because it is
easy for them to use. (i.e the box pops up and they fill
it in and his enter. easy for them.) Easy is the key here.
It also seems faster because they dont have to keep using
the mouse to move around the form.
I will check out the link you provided and see if that
would better suit us. Thanks again.
 
G

Greg

John,

It is higly likely that this could be improved as I am a
vba novice, but the following may work if you would change
to using ASK vice FILLIN fields:

Sub AutoNew()
Dim oFld As Field
Dim oCount As Long
oCount = InputBox("How many fields do you want to
update?", "Update Fields", 1)

For Each oFld In ActiveDocument.Fields
If oFld.Type = wdFieldAsk And oCount > 0 Then
oFld.Update
oCount = oCount - 1
ElseIf oCount = 0 Then
Exit Sub
End If
Next oFld

End Sub
 
J

John

I tried getting this to work but had trouble after
following the directions at the link provided. I will keep
trying and I am looking further into userforms because I
really do not understand them.


Any further details would be appreciated.
 
G

Guest

thanks for the tip but I do not understand where I would
put the program language below.
 

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