Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2006

    Unanswered: Form Not Updating my records.

    In my form I've got a subform set up with a list of contacts, with a short description on them. Next to their record, it's got a button, when the button is clicked it opens a new form to display their full information.

    But I run into the problem, that when I click the button on a different person instead of the first person in the list, only the first person shows up on the newly opened form. I have to cycle through the people on the list to get to said person I clicked.

    Is there a way that I can have it so when I pass the information from the sub-report, to a new main form...this is the current code I'm using.

    Private Sub Command21a_Click()
    On Error GoTo Err_Command21a_Click
        DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
        If IsNull(Me![CompanyCode]) Then
             MsgBox ("You cannot open this trade show form because it does not exist. You must enter form information before it can be opened.")
            Exit Sub
        End If
        Dim stDocName As String
        Dim stLinkCriteria As String
        stDocName = "Trade Show"
        stLinkCriteria = "[CompanyCode]='" & Me.CompanyCode & "'"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
        Exit Sub
        MsgBox Err.Description
        Resume Exit_Command21a_Click
    End Sub

  2. #2
    Join Date
    Mar 2006
    And yes, on the new main form I'm using a Form.Requerry as well.

Posting Permissions

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