Results 1 to 2 of 2
  1. #1
    tylerg11 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    200

    Find and Select Continuous Form record using VBA


    I have a continuous form, and I would like to programatically find and select one of the records with VBA if it meets certain conditions. How would I do this? Basically trying to control the record selector arrow with VBA.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You could:

    1. Use code to set the Filter and FilterOn properties of the subform

    2. Use RecordsetClone and bookmarks to set focus to desired record. Example from my project:
    Code:
    Public Sub tbxLabNum_AfterUpdate()
    Call ClearCustom
    Me.grpFilter = 1
    Me.lbxQueries = Null
    Me.Requery
    With Me.ctrSampleList.Form.RecordsetClone
        .FindFirst "LabNum='" & Me.tbxLABNUM & "'"
        If .NoMatch = True Then
            MsgBox "Invalid Lab Number", , "EntryError"
            Me.tbxLABNUM.SelStart = 6
        Else
            Me.ctrSampleList.Form.Bookmark = .Bookmark
        End If
    End With
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Delete continuous form record
    By tylerg11 in forum Forms
    Replies: 3
    Last Post: 03-09-2012, 03:00 PM
  2. VBA delete current record continuous form
    By tylerg11 in forum Forms
    Replies: 3
    Last Post: 02-17-2012, 12:57 PM
  3. Hiding a new record in a continuous form
    By system243trd in forum Forms
    Replies: 3
    Last Post: 12-03-2011, 01:04 AM
  4. Replies: 13
    Last Post: 11-08-2011, 11:57 AM
  5. Get position of record in continuous form
    By Whizbang in forum Forms
    Replies: 3
    Last Post: 11-02-2011, 01:47 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