Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Type Mismatch ?????
Message
De
27/08/2001 12:27:30
 
Information générale
Forum:
Microsoft Office
Catégorie:
Access
Divers
Thread ID:
00549451
Message ID:
00549491
Vues:
16
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
Here's to alcohol...the cause of ... and solution to ... all of life's problems - - Homer J. Simpson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform