Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Documenter does not display the DELETE query in Microsoft Access


View products that this article applies to.

Moderate: Requires basic macro, coding, and interoperability skills. This article applies only to a Microsoft Access database (.mdb).

↑ Back to the top


Symptoms

When you use Documenter in Microsoft Access, the DELETE query does not appear for a selection in the Documenter dialog box.

↑ Back to the top


Workaround

To work around this problem, you can use one of the following methods. The method that you use depends on the version of Access that is installed on your computer.

Method 1

Access 2000

In Access 2000, you can run a code sample that is similar to the following code sample. You want to do this to document your queries. The following code sample determines the type of query. The following code sample prints the name of the query and the type of query. The following are possible types of queries:
  • SELECT
  • APPEND
  • UNION
  • DELETE
  • CROSSTAB
To run the code sample, follow these steps:
  1. Start Access 2000. Open the database that you want to document.
  2. On the Insert menu, click Module.
  3. Put the following code sample in the module that you created in step 2.

    Note The following code requires a reference to Microsoft DAO 3.6 Object Library. To add the reference, on the Tools menu in the Visual Basic Editor, click References.
    Sub printQueries()
    
        Dim dbs As Database, qdf As QueryDef
        
        ' Return the reference to the current database.
        Set dbs = CurrentDb
        ' Update the QueryDefs collection.
        dbs.QueryDefs.Refresh
        For Each qdf In dbs.QueryDefs
            If Left(qdf.Name, 1) <> "~" Then
                Debug.Print qdf.Name & ": "
                
                Select Case qdf.Type   ' Evaluate the type of query.
                    Case 0    ' 0 = Select query.
                        Debug.Print "     Select query"
                    Case 16   ' 16 = Crosstab query
                        Debug.Print "     Crosstab query"
                    Case 32   ' 32 = Delete query.
                        Debug.Print "     Delete query"
                    Case 64   ' 64 = Append query
                        Debug.Print "     Append query"
                    Case 128  ' 128 = Union query
                        Debug.Print "     Union query"
                    Case Else    ' Other values
                        Debug.Print "     Other type of query: Type is: " & qdf.Type
                        
    End Select
    '            Debug.Print qdf.Type
            End If
                       
                Next qdf
        Set dbs = Nothing
    
    End Sub
    
  4. On the View menu, click Immediate Window.
  5. On the Run menu, click Run Sub/UserForm.

    Note In the Immediate window, the name of the query and the type of query appear.

Method 2

Access 2002 and Office Access 2003

In Access 2002 and in Office Access 2003, you can show hidden objects. You want to show hidden objects to make the DELETE query appear in the Documenter dialog box. To do this, follow these steps:
  1. Start Access 2002 or Office Access 2003. Open the database that you want to document.
  2. On the Tools menu, click Options, and then click the View tab.
  3. On the View tab, click to select the Hidden objects check box, and then click OK.

    Note The DELETE query now appears for the hidden objects selection in the Documenter dialog box.

Method 3

Access 2007

In Access 2007, you can show the hidden objects to make the DELETE query appear in the Documenter dialog box. To do this, follow these steps:
  1. In Access 2007, open the database that you want to document.
  2. Right-click Navigation Pane, and then click Navigation Options.
  3. In the Navigation Options window, click to select the Show Hidden Objects check box under Display Options, and then click OK.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

For more information about using Documenter, click Microsoft Office Access Help on the Help menu, type database documenter in the Search for box in the Assistance pane, and then click Start searching to view the topic.

↑ Back to the top


Keywords: KB888636, kbprb, kbtshoot, kbdesign, kbdatabase, kbreport

↑ Back to the top

Article Info
Article ID : 888636
Revision : 7
Created on : 12/27/2006
Published on : 12/27/2006
Exists online : False
Views : 467