AllowEdit Command (DDE)

Microsoft Query

Show All Show All

AllowEdit Command (DDE)

Determines whether editing is allowed in a query window. This command is available on both the system channel and the query channel. It is equivalent to the Allow Editing command on the Records menu.

Syntax 1

AllowEdit(allowedit, locked)

Syntax 2

Allow.Edit(allowedit, locked)

The two forms of syntax are equivalent.

allowedit Determines whether editing is allowed in the query window. Can be True or False.

locked Determines whether the Allow Editing command on the Records menu is disabled when UserControl is in effect. Can be True or False.

Example

This example executes a previously built SQL statement. The example then sends the AllowEdit command and the UserControl command to Microsoft Query to allow the user to view but not edit data in the data source (the Allow Editing menu command is disabled after UserControl is in effect).

DDEExecute chan,"[BuildSQL(""" & sql & """)]")
DDEExecute chan,"[QueryNow()]")
DDEExecute chan,"[AllowEdit(False, True)]")
DDEExecute chan,"[UserControl(""&Return Data"", 3, False)]")