Home  Fees/Services  Access Templates  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links

Visual Basic Tutorial
   
Access Programming Examples
Problems With Crosstab Query

Crosstab Quirks Bugs Error Visual Basic for Microsoft Access
Microsoft Access Tutorial>Visual Basic Tutorial>OutputTo Crosstab Bug Download VBA Example  



VB Age Calculation
VB6 Change Case
Calculate Running Sum
VB Concatenate Records
VB CreateQueryDef
VB6 Database Path
Detail-Master Update
VB Field Validation VBA
VB Field Value New-Old
VB FindFirst Recordset
Get Version Number
VB Global Parameters
Global Variables
Labels as Links
VB Launch Outlook
VB List Box Files List
VB Mail Merge
OutputTo Crosstab
VB Read Email Access
VB Sort Recordset
VB Recordset Filters
VB Reference Form Field
RTF Report Email
VB Select Case
Email From Access
VB Transaction Processing

Visual Basic Function Examples


Programming Microsoft Access Visual Basic

Apparent Microsoft Access Bug with Global Variables & OutputTo Using Crosstab Query Docmd Method

We have recently encountered what appears to be a bug in Microsoft Access 2000, 2002 & 2003. This bug occurs when we setup a query with global variables in the criteria (where clause).  Then we use this query as input to a crosstab query.  The next step is to use the Docmd.OutputTo command to send the results of the cross tab out as an Excel spreadsheet.  The bug is centered around the OutputTo method.

The easiest work around we found was to change the crosstab query to a make table query and then export the temporary table to Excel - this method works fine.

There are other bugs with crosstab queries such as not being able to reference form fields as criteria in the crosstab or queries supplying data to the crosstab query. (thanks Bill).

Try our downloadable Access database demonstration of using Global variables as query parameters.


Contact Information

Programming Visual Basic Tutorial

Access Visual Basic/VB/VBA/VBScript/VB6 2007 2003 2000 All Windows Versions