Solved

OLE or DDE exchange Word 6 to Access 2

Posted on 1997-12-03
1
343 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
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…

808 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