Tech Support Forum banner
Status
Not open for further replies.
1 - 3 of 3 Posts

· Registered
Joined
·
3 Posts
Discussion Starter · #1 ·
Hi All,

I am new to this thread and first of all my wishes to everyone here.

I do have a little knowledge in VBA and VB, not a full time programmer but write small scripts to help my regular activities.

Here I go with my query in winword.

I have a huge list of database with two columns as below

Description Animal
Lives in Forest Lion
Lives in House Dog
Lives in Den Lion
House Pet Dog
House Pet Hen
Lives in House Cat
Lives in Forest Tiger
Lives in Zoo Lion
Lives in Forest Elephant
House Pet Cat
House Pet Pigeon
House Pet Fish
Sea animal Octopus
Wild Animal Lion


Now my question is I want the above database to be linked to a winword and when ever I press a predefined key to get the input and when i give the input as House Pet, I should get the below list as drop down menu and I should select it from the dropdown list to be entered at the position of cursor

House Pet Dog
House Pet Hen
House Pet Cat
House Pet Pigeon
House Pet Fish

When I give the input as Lives in Forest I should get the following list

Lives in Forest Lion
Lives in Forest Tiger
Lives in Forest Elephant


Is there any possibility to do this after linking it to a database like excel / access etc.

I do not even want the entire program for this, but any guidance on the basic concept would be great help.

Hope to receive all of your extreme support.

Thanks in advance.

Regards,
Sundaram.
 

· TSF - Emeritus
Joined
·
1,229 Posts
Hey Sundaram,

You can do this, it will be a bit of development though. In word, you will need to have create a custom userform. This will be the dropdown lists that come up upon a command (ctrl+q). On this form you have an Okay and a Cancel button. The okay will submit your choices (from the dropdown list) into a SQL query that can be pulled from an Excel or Access Database. That will pull the information into Word, as a table... or whatever you want.

I honestly, dont have time to create something this detailed, but I can help you with any problems you run into or perhaps someone else on this site can design it for you.

Keep in mind, there are other ways to do this that are likely simpler, this is just how I would do it.

HTH,

Robert D. Specian Jr.
 

· Registered
Joined
·
3 Posts
Discussion Starter · #3 ·
Hi Specian,

So kind of you to do that to me. This has really given me a sort of an idea to proceed further. Thanks for the help.

Would post the code for your review once I complete it.

Have a great day and a wonderful weekend.

Regards,
Sundaram.
 
1 - 3 of 3 Posts
Status
Not open for further replies.
Top