Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Type Mismatch ?????
Message
 
À
27/08/2001 12:27:30
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Divers
Thread ID:
00549451
Message ID:
00549609
Vues:
12
This message has been marked as the solution to the initial question of the thread.
You need to check references and make sure that reference to "Microsoft DAO 3.6 Object Library" is checked.
To do that:
1. Open Code Window;
2. Go menu bar Tools | References.

HTH, Igor


>Hi Igor, Thanks for the help but the first line of code:
>"Dim R As DAO.Recordset" is generating the following error:
>
>"Compile Error: User Defined Type Not Defined"
>
>
>
>
>Hi Michael,
>
>Are you sure that field CATALOG is a string datatype? If it is NUMERIC it would give you an error.
>Personally I prefer code like this:
>
>
>Private Sub Command32_Click()
>
>Dim R As DAO.Recordset
>Dim SQLText as String
>
>SQLText = "Select * From Product Where Catalog = 'CAT3';"
>Set R = CurrentDb.OpenRecordset(SQLText,dbOpenDynaset) ' consider dbOpenSnapshot
>If not R.BOF() Then
> MsgBox "Record exists"
>Else
> MsgBox "Record not found"
>End If
>R.Close
>Set R=Nothing
>
>End Sub
Igor Gelin
Database Developer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform