Best Form Design for this situation

A

Al & Cay Grant

Hi Folks,

I hope someone can give me some advise on this.

I have a form that allows entry of personal informaiton into
a document. Most of the time when the template is opened
and the form pops up only one person is entered.

Sometime though two or three people may need to be entered
via the form and very occasioanly even more.

I was thinking of a multipage or a tabstrip, but even if I put in
a 9 page strip, their is bound to be the odd occasion once in a
blue moon where their will be 10 people that need to be entered.

Whats the best way to deisgn a form to handle this?

Cheers in advance,

-Al
 
D

Doug Robbins - Word MVP

Answered in microsoft.public.word.userforms.


Please do not spam the newsgroups by posting the same question separately to
multiple newsgroups. Rather, if you are not sure which is the most
appropriate newsgroup, insert the names of those which you think might be
appropriate into the header of a single message. When you do that, an
answer in one newsgroup will automatically appear in all of the newsgroups
to which you posted. That will make it easier for you to find responses and
can also reduce the possibility of someone developing an answer to a
question that has already been answered.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
J

JGM

Hi Al,

Maybe something very simple will do the trick.

Design your form to take care of one person only. Then, add three buttons:

Continue Finished Cancel

The "Continue" button will insert the current info from the userform in the
Word document, then clear the form controls values and redisplay a blank
form so that the user can add another person, and so on. This way you do not
even have to think about "How many people will the user possibly enter?" You
are not limiting the user, which is always bad, well at least in my humble
opinion. I guess to make it clearer, you could label that button "Add
person" or some such label.

The "Finish" button will close the form and enter the last person's details
in the document.

Also, depending on the type of document, I would consider adding a toolbar
button to callback the form if the user realised after starting to use the
document that he/she has forgotten to add a person...

HTH
Cheers!
 
A

Al & Cay Grant

Hi Jean-Guy,

Yes, I thought of something like that, and I may well take your advise.

I was thinking of a multpage with a "add page" button, which is easy enough,
but then on each new page I need copies of all the text boxes all over
again.

- AL
 
J

JGM

Hi Al,

It maybe easy to code the multi page, but to what cost? It might end up
being a mess for the user once they go over, let's say, 5 people....
All these pages might well confuse them and and they might end up dreading
using the template with a large number of people...

If you haven't seen it yet, check out this web site, worth the time if you
design a lot of interfaces...
http://digilander.libero.it/chiediloapippo/Engineering/iarchitect/mshame.htm
especially the "Tabs" section...

Here is another idea for your situation...

Set up the text field as you want them, and place an ADD button next to the
fields that will take the content of the text fields and add an entry in a
mutli column list box at the bottom of the form (Of course this will be
totally impratical if you have over 5-6 text fields, or if some of the text
fields are very long... In which case, you could have a Multiline control to
display the full content of the currently selected item in the list box,
which would list only the names...). This approach would give the user the
chance to review the info before inserting it in the document. Add a DELETE
button as well as a MODIFY button next to the list box to that effect.
Finally, place two buttons at the very bottom or top right... INSERT and
CANCEL.
Done right, this could end up being very professional looking while being
very user friendly.

HTH
Cheers!
 
A

Al & Cay Grant

What does a multiline control look like?

I had begun to impliment a similar version of the idea you suggested,
but I only had a "ADD" button which inserted the personal data into the
template, clears the text boxes, and adds another 4 rows into the table for
the next
person to be inserted. I did not think of a DELETE button as once they
were inserted that was it! No chance to review.

My fields are;

Name DOB
Address AGE
Town OCC:

-Al
 
A

Al & Cay Grant

Jean-Guy,

One thing I don't get. Only the name needs to be put into the list box after
the user hits "ADD". To put all the personal information for that name in
their, even as a multi column would be too much information (about 8/9
columns). Soooo, if only the name in the list box, where does all the other
personal information get "stored" until insertion? In some array variable or
something?

Thanks

-Al
 
J

JGM

Hi Al,

Right, you do not need to fill the list box with all the columns, only the
minimum to insure that the user can distinguish between defendants having
the same name, so you could display name and DOB for example. The rest of
the data would be stored in an array variable which would be used to
populate the document. This variable would contain necessarily all the
columns.
 
A

Al & Cay Grant

Yes I was going to display only name and hide the other 8 columns, but if I
follow your thoughts then I only need two columns, name1 and name2.



The rest of the data is stored in an array....



One array for each person or one BIG array?



Cheers



-Al
 
A

Al & Cay Grant

So Far for the Add button I have;

Private Sub CommandButtonAddOffender_Click()
Dim OffenderArray As Variant
ListBox2.ColumnCount = 10
ListBox2.ColumnWidths = "100;0;0;0;0;0;0;0;0;0"
ReDim OffenderArray(0, 10)
OffenderArray(0, 0) = TextBox1.Value & " " & TextBox2.Value
OffenderArray(0, 1) = TextBox1.Value
OffenderArray(0, 2) = TextBox2.Value
OffenderArray(0, 3) = TextBox3.Value
OffenderArray(0, 4) = TextBox4.Value
OffenderArray(0, 5) = TextBox5.Value
OffenderArray(0, 6) = TextBox6.Value
OffenderArray(0, 7) = TextBox7.Value
OffenderArray(0, 8) = TextBox8.Value
OffenderArray(0, 9) = TextBox9.Value
ListBox2.List() = OffenderArray

' need statement here clearing the textboxes

End Sub

Cheer

-Al
 
J

JGM

Hi Al,

I would go with three columns: Name 1, Name 2 and DOB in case you have two
Peter Smith.... and I would use one big array that would be appended
everytime the user clicked on ADD.

HTH
Cheers!
 

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