Sorting a table used in a form

K

Keith Smothers

I have a document set up as an ordering form. I have used
the Form menu to create the various fields I need to fill
in for the order.

For the basic layout of the form I used a six column
table. After I enter all of my items, I need to be able to
sort the entire table by item number (one of the fields I
have created in the form/table).

To speed up data entry, I want to be able to enter the
item numbers in order and then sort the table after data
entry. Is there any way to do this while using the 'forms'
set up?

TIA
Keith
 
D

Doug Robbins - Word MVP

Hi Keith,

I thought that you should be able to do that by running a macro on exit from
a formfield that unprotected the document, sorted the table and then
reprotected the document. However, every time that I tried it, it caused
Word to crash, even when I included a command to .Unlink the formfields.

Regardless, I do not consider this type of form very suitable for entering
orders as it is difficult to accomodate varying numbers of items.

I would use a userform with a listbox that I would populate with the details
of each item that would be entered into text boxes on the form with an add
button to transfer the data to the listbox. The you would have another
button on the form that would transfer the information from the listbox to a
table in the document and do the sort.

See the article "How to create a Userform" at:

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


--
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
 
K

Keith Smothers

Doug -

Thanks for the feedback! I have printed out the article
you provided the link for and I'm going to start hacking.

BTW, I didn't mention this in my original post, but
ultimately I want to be able to use this form in my
emails. I have Word set up as my email editor, so I'm
assuming once I get the form working in Word, I will be
able to use it in Outlook. Any gotchas there?

Thanks again,
Keith
 
D

Doug Robbins - Word MVP

Hi Keith,

I can't answer your question about using it in Outlook. There are however a
few other articles on the website to which I referred you that will be of
interest to you.

--
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
 

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