[mso] Re: Word 2002: VB forms, combo boxes and merging with outside data!

  • From: "Green" <1z@xxxxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Wed, 14 Sep 2005 00:33:41 +0200

Hi Cathy,

If this was ms access you could prob use sub forms.... but I'm
assuming it isn't.

I think you are right in thinking you need to use if.. then.. else.

Personally, I would probably use a 2 column combo box and populate it
with the project name and description. You don't actually need to show
the description if you don't want to but it's there and "connected" to
the correct project that's been chosen in the combo box.

It's a while since I did anything like this so I'm perhaps not
remembering exactly but...

The code may go something like....
... and the number of columns needs to be set in the combo box
properties...

  .Additem ""
  .List(ListIndex,0).text = "Project00"
  .List(ListIndex,1).text = Description00

... and so on.

If this makes not a lot of sense get back and we'll delve a bit.

HTH
Lisa

> What is my best source of learning how to implement linking
> a word form to
> a data source for creating a combo box look-up?
>
> By word form, I mean a visual basic form.  I have a combo
> box look-up on
> the form with the following code:
> With cboProject
> .AddItem "Project00"
> .AddItem "Project01"
> .AddItem "Project02"
> etc. through about 35 project numbers.
>
> Combo box works fine, but each of the 35 project numbers
> has it's own
> description.  I'm wanting to pass that description text
> onto the form
> depending on the value selected in combo box.
>
> Can I handle it with some kind of vb merge, and if so, how?
>  OR can I
> handle it with an if/then type of loop, and if so, where do
> I begin there?
> The data source can be anything, doesn't matter if it's
> access or a word
> table or excel, or whatever is the best format.  The key is
> it needs to be
> a relative link because I won't know the server/path
> situation in the
> remote location, so I'll give the data source a specific
> name and keep it
> in the same directory as the Word vb form.
>
> Any ideas of where I need to start?  Thanks, Cathy


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: