Activate Command (DDE)

Microsoft Query

Show All Show All

Activate Command (DDE)

Activates the specified query window. This command is used to change the active window when more than one window is open. It is available only on the system channel.

Syntax

Activate(queryname)

queryname The name of the query window to activate

Example

This example executes two queries, creating two query windows. After executing the second query, the example makes the window created by the first query the active window.

DDEExecute chan, "[BuildSQL('Select * From Customers')]"
DDEExecute chan, "[QueryNow()]"
stQueryname1 = DDERequest(chan, "Query")
DDEExecute chan, "[BuildSQL('Select * From ORDERS')]"
DDEExecute chan, "[QueryNow()]"
stQueryName2 = DDERequest(chan, "Query")
DDEExecute chan, "[Activate('" & stQueryname1(1) & "')]"