Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2002

    Unanswered: Assign Recordset to a SubForm

    I am using an Access 2k adp, and am trying to assign an ado recordset to a subform.

    Here is the code that I am using:
    dim rsx as adodb.recordset
    Set rsx = New ADODB.Recordset
    With rsx
    .ActiveConnection = CurrentProject.Connection
    .CursorType = adOpenKeyset
    .LockType = adLockOptimistic
    .Source = "select * from products"
    Set Me.sfmSearchAllResults.Form.Recordset = rsx
    .ActiveConnection = Nothing
    End With

    I get the error:

    7874 : Microsoft Access can't find the object 'Recordset.'

    Any ideas on why this won't work??

  2. #2
    Join Date
    Jul 2004
    Have a look a this website for referencing subforms:

  3. #3
    Join Date
    Dec 2002
    Thanks - seems that I'm referencing the form correctly.

    Any ideas on the problem that I'm having?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts