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

Dim rst query. 1

Status
Not open for further replies.

RBP

Programmer
May 5, 2001
88
0
0
GB
Can anyone help with this quickie?

I have an Access DB, with various Forms based on Query's.
What I would like to do is -
On the form add a nav button to select next/prev record, (plus some other stuff).

I have tried :
Dim db As Database
Dim rst As Recordset

Set rst = Me.Recordset : when executing this line I get error code 13 type mismatch.

onclick button rst.move next etc.

I have tried to define the DB as DAO. and ADOB. (bit vague on these...)

No joy, I have also tried RTFM Microsoft help, and as usual all of it is vague.

I KNOW it is something simple, as I have coded similar in Access 97, this is 2000.

Can anyone point me to the correct part of the manual?
Thanks in advance.
etc.
 
try
Dim db As DAO.Database
Dim rst As DAO.Recordset

Make sure that in your references thatMicrosoft 3.? is ticked

Hope this helps
Hymn
 
Used the code below, checked DAO3.
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim fld As Field
Set rst = Me.Recordset
Still get run time 13, type mismatch, on line above.
Will keep trying thanks.
 
You may try this:
Set rst = Me.RecordsetClone

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
All sorted now thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top