ACC2000: RefreshDatabaseWindow Method Does Not Work in an Access Project (ADP) (304256)
The information in this article applies to:
This article was previously published under Q304256 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access project (.adp).
SYMPTOMS
The RefreshDatabaseWindow method in an Access project does not work.
RESOLUTION
To work around this behavior, call the Execute method of the CommandBarControl object. The following is sample code to do so:
Private Sub Command0_Click()
'Requires reference to Office 9.0 object library.
Dim strSQL As String
Dim cBars As Office.CommandBars
Dim cBarCtl As Office.CommandBarControl
strSQL = "CREATE TABLE Test (ID varchar(5) PRIMARY KEY NOT NULL)"
CurrentProject.Connection.Execute strSQL
DoCmd.SelectObject acTable, , True
Set cBars = Application.CommandBars
Set cBarCtl = cBars.FindControl(msoControlButton, 3812)
If Not cBarCtl Is Nothing Then
cBarCtl.Execute
End If
End Sub
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 6/28/2004 |
---|
Keywords: | kbbug kbpending KB304256 |
---|
|