Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2001
    Location
    Australia, QLD
    Posts
    5

    Unanswered: Recordset question

    hi there guys!!
    i'm struggling with module code which should shows
    result of query in subform to main form
    <when user click any item in subform(database sheet view)>

    Private Sub Form_Current()
    Me.Parent.Recordset.FindFirst "Manufacturer_id=" &
    Me .Manufacturer_id
    End Sub

    above code just can indicate the first record of subform
    how can i fix it????? please help me dude~~~~


    i also tried different way

    Private Sub Form_Current()
    Dim rst As DAO.Recordset

    Set rst = Me.Parent.RecordsetClone
    rst.FindFirst "Manufacturer_id=" & Me.Manufacturer_id
    Me.Parent.Bookmark = rst.Bookmark
    End Sub

    but it doesn't work at all...

  2. #2
    Join Date
    Jan 2002
    Location
    At the Edge of America!
    Posts
    55
    You need to do this:


    Private Sub Form_Current()
    Dim db as DAO.Database
    Dim rst As DAO.Recordset

    Set db = CurrentDB
    Set rst = db.OpenRecordSet("tblDesired")
    rst.FindFirst "Manufacturer_id=" & Me.Manufacturer_id
    Me.Parent.Bookmark = rst.Bookmark
    End Sub

Posting Permissions

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