Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access CrossTab query
Message
From
05/04/2005 09:49:16
 
 
To
All
General information
Forum:
Visual Basic
Category:
Access
Title:
Access CrossTab query
Miscellaneous
Thread ID:
01001474
Message ID:
01001474
Views:
62
Dear All,

I am trying to open a recordset from a crosstab query which I build using a FoxPro Link table in Access. The name of the query is concentrat_Crosstab1.

When I try to open a recordset from that crosstab query, I get a 'Type Mismatch' error. Following is the code I am using to open a recordset.

Dim MyDB As Database
Dim RS As Recordset
Dim QD As QueryDef
dim MyVar as string

Set MyDB = DBEngine(0).OpenDatabase("C:\DB\DataQC.mdb")

Set QD = MyDB.QueryDefs("concentrat_Crosstab1")

'I am getting an error on the following line.
Set RS = QD.OpenRecordset(dbOpenDynaset)

While Not RS.EOF

MyVar = rs!FieldName

Wend

Any help will be greatly appreciated.

Thanks.
Reply
Map
View

Click here to load this message in the networking platform