suoirotciv
Programmer
I have this code below in VB. And i got this Run-time error '13': Type mismatch
Did I miss something???
Thanks for any help to resolve this problem
===================================================
'REFERENCE: DAO 3.51
If Len(Dir$("c:\Database.mdb"
) > 0 Then Kill ("c:\Database.mdb"
If Len(Dir$("c:\Database.mdb"
) = 0 Then
Set tmpDB = CreateDatabase("C:\Database.mdb", dbLangGeneral)
tmpDB.Execute "CREATE TABLE Table1 (Field1 NUMBER, Field2 DATE)"
End If
Set tmpRS = tmpDB.OpenRecordset("Table1"
With tmpRS
.AddNew
!Field1 = Value1
!Field2 = Value2
.Update
End With
Please pardon the grammar.
Not good in english.
Did I miss something???
Thanks for any help to resolve this problem
===================================================
'REFERENCE: DAO 3.51
If Len(Dir$("c:\Database.mdb"
If Len(Dir$("c:\Database.mdb"
Set tmpDB = CreateDatabase("C:\Database.mdb", dbLangGeneral)
tmpDB.Execute "CREATE TABLE Table1 (Field1 NUMBER, Field2 DATE)"
End If
Set tmpRS = tmpDB.OpenRecordset("Table1"
With tmpRS
.AddNew
!Field1 = Value1
!Field2 = Value2
.Update
End With
Please pardon the grammar.
Not good in english.