Results 1 to 2 of 2
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    Pass DAO.Recordset into public function

    I'm trying to work with a recordset into a public function of a module

    I have

    function nameOfFunction(rs as dao.recordset)
    If rs.RecordCount = 0 Then
    MsgBox "no records yet"

    Exit Function
    End If
    end function



    outside on the button on a form I have

    Dim rs As DAO.Recordset
    Set rs = Me.RecordsetClone
    call nameOfFunction(rs)
    msgbox "Check done"

    however this does not work - can anyone help me out please...

  2. #2
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Nevermind sorted

    I wasn't passing the rs to an object.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Pass recordset field into function
    By Ruegen in forum Programming
    Replies: 6
    Last Post: 04-13-2014, 11:04 PM
  2. Turning Private Function Into Public
    By g4tv4life in forum Programming
    Replies: 1
    Last Post: 02-04-2014, 05:31 PM
  3. Replies: 11
    Last Post: 05-17-2013, 06:10 AM
  4. Making a Public Function more flexible
    By sjs94704 in forum Programming
    Replies: 2
    Last Post: 12-10-2012, 02:21 PM
  5. Replies: 9
    Last Post: 12-20-2010, 08:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums