Question : Connect to a Crosstab query in Access from Excel

I am connecting to Accesss 2003 from Excel 2003 using an ODBC connection. I want the query results to load directly into Excel. This works with Select queries not with the Crosstab query I want to see. Is this simply not possible and, if so, why? Otherwise could you help, please? I am getting a message box with this message...
[Microsoft][ODBC Microsoft Access Driver]Invalid character value for cast specification on column number 28 (9)

Many thanks

Answer : Connect to a Crosstab query in Access from Excel

PLease understand that I am testing but not wanting to delete files hence I break on the instance and don't delete ... therefore I forgot to re-enable the delete again, corrected again below.

Now why didn't I grab the points by saying use VBS in the previous Q! it would have been so much easier.

Chris
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
dim FSO  
dim fil  
dim strFolder  
dim objFolder  
Dim totalbytes  
  
strFolder = "c:\deleteme"  
Set fso = createobject("scripting.filesystemobject")  
Set objFolder = FSO.GetFolder(strfolder)  
totalSize_recur objFolder, totalbytes  
msgbox "TotalBytes " & totalbytes & vbcrlf & "Target is: " & 2^30 
If totalbytes > 2^30 Then  
        dateCheck_recur objFolder  
End If  
  
  
Sub totalSize_recur(fldr, overallsize)  
Dim subFolder  
  
        overallsize = overallsize + fldr.size  
        For Each subFolder In fldr.subfolders  
                totalSize_recur subFolder, totalbytes  
        next  
          
End Sub  
  
Sub dateCheck_recur(fldr)  
Dim subFolder  
  
        For each fil in fldr.files  
                If fil.datecreated < Now - 7 Then  
                        fil.delete  
                End If  
        Next  
        For Each subFolder In fldr.subfolders  
                dateCheck_recur subFolder  
        Next  
        If fldr.files.count = 0 and fldr.subfolders.count = 0 Then fldr.delete  
          
End Sub
Random Solutions  
 
programming4us programming4us