Application.DeleteReportControl Method
Access Developer Reference |
The DeleteReportControl method deletes a specified control from a report.
Syntax
expression.DeleteReportControl(ReportName, ControlName)
expression A variable that represents an Application object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
ReportName | Required | String | The name of the report containing the control you want to delete. |
ControlName | Required | String | The name of the control you want to delete. |
Return Value
Nothing
Remarks
The DeleteReportControl method is available only in form Design view or report Design view, respectively.
Note |
---|
If you are building a wizard that deletes a control from a form or report, your wizard must open the form or report in Design view before it can delete the control. |
Example
The following example creates a form with a command button and displays a message that asks if the user wants to delete the command button. If the user clicks Yes, the command button is deleted.
Visual Basic for Applications |
---|
|
See Also