****(HELP) on a *STUPID QUESTION*

R

Robert

Is the fragment of code below ADO or DAO or Am I all
mixed up?

********************************************************
Dim rs As Object

Set rs = Me.Recordset.Clone

rs.FindFirst "[ClientTypesID] = " & _
Str(Nz(Me![LstB_MainFormListBox1], 0))

If Not rs.EOF Then Me.Bookmark = rs.Bookmark

Set rs = Nothing
********************************************************

Thanking you in advance, Robert.
 
D

Dirk Goldgar

Robert said:
Is the fragment of code below ADO or DAO or Am I all
mixed up?

********************************************************
Dim rs As Object

Set rs = Me.Recordset.Clone

rs.FindFirst "[ClientTypesID] = " & _
Str(Nz(Me![LstB_MainFormListBox1], 0))

If Not rs.EOF Then Me.Bookmark = rs.Bookmark

Set rs = Nothing
********************************************************

Thanking you in advance, Robert.

The code is essentially agnostic, as far as defined references are
concerned. It doesn't say what type of object rs is, so late binding is
used. However, the use of the FindFirst method implies that the form's
recordset is a DAO recordset -- which it will normally be if the form is
in an .mdb file -- because an ADO recordset doesn't have a FindFirst
method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top