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

  • Thread starter Thread starter Robert
  • Start date Start date
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.
 
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.
 
Back
Top