Solved

OLE or DDE exchange Word 6 to Access 2

Posted on 1997-12-03
1
338 Views
Last Modified: 2008-02-01
I have a Word 6 online form with text fields and dropdown boxes for input, how do I link the text fields to an Access 2 database table or form by OLE or DDE so a button click exchanges the data automatically?

Background:

Computer Telephony Integration using Windows95 TAPI to 'Screen Pop' a Word 6 script for agents to input data into an online form to exchange, create or update an Access 2 backend database.

Thanks in advance
0
Comment
Question by:MattWilliams
1 Comment
 
LVL 1

Accepted Solution

by:
robandrw earned 100 total points
ID: 1605511
I suppose this is an answer that you expected to get but I risk stating the obvious. One wonders why you are not using an Access form to input the data. Would save many hassles.

Anyway, you can't use OLE as Word can only act as an OLE Server, not a Client. Which means that you have. There are many examples in the MS-Acces 2.0  and MS-Word help files under search topic  DDE. In the MS-Access help file there is a complete section on using MS-Access as a DDE server.

Thje following piece of code (courtesy the MS Access help file) shows a word basic macro that access a MS-Access data base.

Sub MAIN
' Using the System topic, open the NWIND.MDB database.
' The database must be open before you can use other DDE topics.
      Chan1 = DDEInitiate("MSAccess", "System")
      DDEExecute Chan1, "[OpenDatabase C:\ACCESS\SAMPAPPS\NWIND.MDB]"
' Get all the data from the Customer List query.
      Chan2 = DDEInitiate("MSAccess", "NWIND;QUERY Customer List")
      MyData$ = DDERequest$(Chan2, "All")
      DDETerminate Chan2
' Close the database.
      DDEExecute Chan1, "[CloseDatabase]"
      DDETerminate Chan1
' Insert the data into a text file.
      Open "MYDATA.TXT" For Append As #1
      Print #1, MyData$
      Close #1
End Sub


0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now