Results 1 to 2 of 2
  1. #1
    Mike4172 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    17

    Change parent record and the subform record?

    So far I haven't found a way. In parent record, there is 6,000 records. Each sub of the parent typically has 10-20 records. I know its possible to go to say parent record 205, but can I make it to where I can go to parent record 205 and sub 12 of the parent?

    The following code is what I have in the parent form and it works great finding parent record.

    Code:
    Private Sub CustID2_KeyPress(KeyAscii As Integer)
    Dim nRecords As Integer
        nRecords = DCount("*", "Multiple Search Two")
        If nRecords = 0 Then
        MsgBox "Customer Not Found in Database.", vbInformation, "Not Found"
       
        Else
        Me.RecordsetClone.FindFirst "[CustomerID] = " & Me![CustID2]
        Me.Bookmark = Me.RecordsetClone.Bookmark
        End If
    End Sub
    The following code works in the subform if the only form I have open is the subform:

    Code:
    Private Sub CustID2_KeyPress(KeyAscii As Integer)
    Dim nRecords As Integer
        nRecords = DCount("*", "Multiple Search Two")
        If nRecords = 0 Then
        MsgBox "Customer Not Found in Database.", vbInformation, "Not Found"
       
        Else
        Me.RecordsetClone.FindFirst "[TicketNO] = " & Me![TickNO]
        Me.Bookmark = Me.RecordsetClone.Bookmark
        End If
    End Sub
    Any ideas or suggestions please let me know.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Should be possible but why? If there are only up to 20 records, then all 20 should be able to be viewed if the subform is in Continuous or Datasheet view, assuming the Master/Child links properties of the subform container are set so that parent and child records are synchronized.
    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: 6
    Last Post: 08-22-2012, 03:24 AM
  2. Replies: 3
    Last Post: 08-21-2012, 01:10 PM
  3. Replies: 3
    Last Post: 08-09-2012, 01:49 PM
  4. Replies: 4
    Last Post: 05-17-2011, 06:56 AM
  5. Replies: 1
    Last Post: 12-22-2010, 01:28 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