Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WHAT IS THIS ERROR?

Status
Not open for further replies.

aqm

Programmer
Aug 26, 2002
65
AO
HI,
I USED SET COMMAND ON MY CODE AND AFTER RUNNING IT GIVES ME THIS ERROR: MISMATCH. WHAT IS IT?
AQM
 
You need to include more information in your question for others to fully understand your problem. (Also, please turn off your Caps Lock!)

If you are trying to use the Set command on a variable that is not an object you will get a type mismatch error. That's as helpful as I can be with the information you've given.

Good Luck!
 
hi,
thank you. my problem is i used this command:

Private Sub Form_Open(Cancel As Integer)

Dim db As Database, t1 As Recordset

Set db = CurrentDb
Set t1 = db.OpenRecordset("TB_SERIAL", dbOpenTable)

then it gives me a mismatch error.
please help.

 
Is TB_Serial A Table ? or may be Query ? Then you go dbOpenDynaset
 
hi,
TB_serial is a table. and i want to read a record on it.

please help.
 
I would personally create new .mdb with this only table and try to run this code.
There is something in this database you may be spend a days guessing.

And always Compact !!!
Try to compact and rerun and then go as i said
We have to find cause
 
With Access 2000, ADO is the default instead of DAO (as it was with older versions). You will need to check which references you are using. If you do not have "Microsoft DAO 2.5/3.51 Compatibility Library" checked, then you need to fully quality your database and recordset objects as follows: (I don't use a database object here, only the current connection.)
<code>
Dim rst as ADODB.Recordset
Set rst = New ADODB.Recordset
rst.Open &quot;TableName&quot;, CurrenctProject.Connection
</code>
Let me know if this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top