Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access CrossTab query
Message
De
05/04/2005 09:49:16
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Access
Titre:
Access CrossTab query
Divers
Thread ID:
01001474
Message ID:
01001474
Vues:
61
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.
Répondre
Fil
Voir

Click here to load this message in the networking platform