Results 1 to 2 of 2
  1. #1
    BorisGomel is offline Competent Performer
    Windows Vista Access 2003
    Join Date
    Apr 2011
    Posts
    101

    Opening sibform at the last record.

    Hello ,

    I have a main from named RequestChecks with two list boxes on it named ListDateii and ListDateiii .Also , there are two subfroms named OperatingAccountII and Operating AccountIII. tHE list boxes have master-child bound relation to the subforms .If user scroll ListDateii and highlight the date , the subfrom shows the resord associated with this date . And the same with ListDateiii. If it is possible, when a user opens the main form RequestChecks, the list boxes show only the date of the last record and consequently the subrofms show the last record.
    I put the below code in main form load events

    ListDtaeii.SetFocus
    ListDtaeii.ListIndex = List0.ListCount - 1
    ListDtaeii.Selected(List0.ListCount - 1) = False
    ListDtaeiii.SetFocus
    ListDtaeiii.ListIndex = List0.ListCount - 1
    ListDtaeiii.Selected(List0.ListCount - 1) = False

    It doesn't work.
    Seond my attemp -I put the code in form current
    Private Sub Form_Current()
    Dim rs As Recordset
    Set rs = OperatingAccountII.Form.RecordsetClone
    If rs.RecordCount Then
    rs.MoveLast


    MySubForm.Form.Bookmark = rs.Bookmark
    End If

    And doesn't work neither.

    I really appareciate your help in advance.
    Thank you,
    The Best Regards.
    BorisGomel

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Google: VBA move to last record in subform
    Review http://bytes.com/topic/access/answer...record-subform
    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. Replies: 9
    Last Post: 09-16-2011, 03:52 PM
  2. Form Not Opening Correct Record
    By halfaguava in forum Forms
    Replies: 1
    Last Post: 06-09-2011, 07:00 PM
  3. Opening A New Record in a Subform
    By michaelb in forum Forms
    Replies: 4
    Last Post: 05-08-2011, 06:08 PM
  4. Button not opening up associated record.
    By BenM912 in forum Forms
    Replies: 0
    Last Post: 03-15-2011, 11:28 AM
  5. Opening a form at a blank record
    By Remster in forum Forms
    Replies: 2
    Last Post: 09-14-2010, 07:46 AM

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