DDEPoke Statement

Description

You can use the DDEPoke statement to supply text data from a client application to a server application over an open dynamic data exchange (DDE) channel.

For example, if you have an open DDE channel between Microsoft Access, and Microsoft Excel, you can use the DDEPoke statement to transfer text from a Microsoft Access database to a Microsoft Excel spreadsheet. In this example, Microsoft Access acts as the client application, and Microsoft Excel acts as the server application.

Syntax

DDEPoke channum, item, data

The DDEPoke statement syntax has these arguments.

Argument Description
channum A channel number, an integer value returned by the DDEInitiate function.
item A string expression that is the name of a data item recognized by application. Check the application’s documentation for a list of possible items.
data A string containing the data to be supplied to the other application.


Remarks

The value of item depends on the application and topic specified when the channel channum is opened. For example, item may be a range of cells in a Microsoft Excel spreadsheet.

The string comprising data must be an alphanumeric text string. No other formats are supported. For instance, data could be a number to fill a cell in a specified range in an Excel worksheet.

If channum isn’t an integer corresponding to an open channel or if the other application doesn’t recognize or accept the specified data, an error occurs.

Tip If you need to manipulate another application’s objects from Microsoft Access, you may want to consider using OLE Automation.

See Also

DDE Function, DDEExecute Statement, DDEInitiate Function, DDERequest Function, DDESend Function, DDETerminate Statement, DDETerminateAll Statement.

Example

See the DDE function example.