Results 1 to 4 of 4
  1. #1
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305

    Open to specific record, not filter to record

    So I've got tabular form of customers, and each customer has an 'open' field. Clicking this field opens a second form that shows that specific customer's info. I want this 'open' field to just open to the specific customer, NOT filter down solely to that customer. I want to be able to freely move from customer to customer within that second form if needed. Is that possible?



    I'm using the following 'on click' code for the 'open' field, but it keeps filtering the second form solely to that customer. Any suggestions?

    Code:
    Private Sub txtOpen_Click()
    On Error GoTo txtOpen_Click_Err
    
    
        DoCmd.OpenForm "frmCustomerDetails", acNormal, "", "[ID]=" & Me.ID, , acDialog
    
    
    txtOpen_Click_Exit:
        Exit Sub
    
    
    txtOpen_Click_Err:
    
    
        MsgBox "Error #" & Err.Number & " - " & Err.Description, , "Error"
        
        Resume txtOpen_Click_Exit
    
    
    End Sub

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    Try this in the click event:

    Code:
    DoCmd.OpenForm "frmCustomerDetails", , , , , , Me.ID
    And this in the Open event of frmCustomerDetails:

    Code:
    If Not IsNull(Me.OpenArgs) Then
        Me.Recordset.FindFirst "ID = " & Me.OpenArgs
    End If
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305
    That worked! Thanks Bob!

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,543
    Quote Originally Posted by templeowls View Post
    That worked! Thanks Bob!
    Glad you have a solution.

    Perhaps you could mark this thread as solved.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Replies: 6
    Last Post: 08-14-2020, 10:15 PM
  2. Replies: 7
    Last Post: 02-11-2020, 01:43 PM
  3. Replies: 2
    Last Post: 10-02-2018, 07:13 AM
  4. Open to a specific record
    By jenkag875 in forum Forms
    Replies: 5
    Last Post: 10-18-2016, 07:16 AM
  5. Open Specific Record
    By halfaguava in forum Forms
    Replies: 1
    Last Post: 06-09-2011, 04:08 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