Re: forms : auto-complete fields based on another field's entry
- From: "macropod" <invalid@xxxxxxxxxxxxxxx>
- Date: Thu, 25 Oct 2007 08:42:56 +1000
Hi ericm,
Doing this requires a fairly straight-forward field construction using and IF test for each branch. For example, suppose your formfield's bookmark name is 'Branch' and the formfield is set to 'calculate on exit', then the following could be used:
{IF{=Branch}= 1 "Branch1 Name¶Branch1 address line 1¶Branch1 address line 2¶Branch1 address line 3¶Branch1 phone¶Branch1 fax"}
{IF{=Branch}= 2 "Branch2 Name¶Branch2 address line 1¶Branch2 address line 2¶Branch2 address line 3¶Branch2 phone¶Branch2 fax"}
etc.
If you don't want all the data showing in the same field result, you could split the fields into two or more parts, eg:
{IF{=Branch}= 1 "Branch1 Name¶Branch1 address line 1¶Branch1 address line 2¶Branch1 address line 3"}
in one location, and
{IF{=Branch}= 1 "Branch1 phone¶Branch1 fax"}
in another location.
Replace the pilcrows (ie ¶) in the above with proper carriage returns or line feeds.
Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------
"ericm" <ericm@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:73997710-D3A9-4783-826E-4E0F8B76D1C5@xxxxxxxxxxxxxxxx
I searched under the words "macro" and "if" but I did not find what I want,
and I think what I need is a macro for the multiple "if/then" statements.
What I want to do is this : When an entry is made into one field, I want the
other fields to auto-fill based on the first field's entry. For example,
there are six branch locations of an office numbered one through six. Each
branch has a seperate address, phone number, fax number, etc... On the form
there are fields for branch number, address, phone, fax, etc... If "1" is
entered in the branch number field meaning branch number one, then the fields
for address, phone, fax, etc. will auto-fill with the address, name, fax etc
for branch number one. The information will be different for branch 2 and so
on.
Thank you.
.
- Prev by Date: Re: How to get my reduced cursor to its original size?
- Next by Date: Print Preview
- Previous by thread: Re: how can i create consecutively numbered documents e.g. ballot pape
- Next by thread: Print Preview
- Index(es):
Relevant Pages
|