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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type Mismatch..Help!

Status
Not open for further replies.

KyleS

Programmer
Oct 23, 2001
619
US
Ok, I'm completely stumped...why does this code give me a type mismatch on the second line "Set rst = Me.RecordsetClose"?

This is the ENTIRE Sub:

Dim rst As Recordset
Set rst = Me.RecordsetClone
txtRecNu = Me.CurrentRecord
txtRecCnt = " of " & rst.RecordCount
If rst.RecordCount <= 1 Then
cmdNRecord.Enabled = False
cmdPRecord.Enabled = False
cmdFRecord.Enabled = False
cmdLRecord.Enabled = False
Else
cmdNRecord.Enabled = True
cmdPRecord.Enabled = True
cmdFRecord.Enabled = True
cmdLRecord.Enabled = True
End If
rst.Close

Any help or pointers would be greatly appreciated.

Oh, this is Access '97.

Thanks again,
Kyle
 
Actually, I got this to work. It had been working for a few months and then didn't. What I did to fix it was remove ALL references from the DB and then added them all back in. Now it recognizes a Recordset as a valid object. (It also would give me the same error on:

&quot;Dim dbs as Database
Set dbs = CurrentDb&quot;



I've just been having extremely strange Access errors lately.


Thanks though,

Kyle ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top