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

Access VBA Tutorial
   
Access Programming Examples
Problems With Crosstab Query

Crosstab Quirks Bugs Error Visual Basic Tutorials for Access 2007 VBA
Access 2007 Tutorial>Visual Basic Tutorial>OutputTo Crosstab Bug Download VBA Tutorials  



Age Calculation
VBA Change Case
Calculate Running Sum
Concatenate Records
VBA CreateQueryDef
Database Path
Detail-Master Update
Field Validation VBA
Field Value New-Old
FindFirst Recordset
Get Version Number
VBA Global Parameters
VBA Global Variables
Labels as Links
VBA Outlook Email
List Box Files List
VBA Mail Merge
OutputTo Crosstab
Read Email Access
Sort Recordset
VBA Recordset Filters
Reference Form Field
RTF Report Email
VBA Select Case
VBA 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/VBA/VBScript/VB6 2007 2003 2000