Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Posts
    173

    Unanswered: troubleshooting filtering files

    I'm using the following code to open the form "frmaddclaimdocs" and have it open to a specific record. I've been using similar code in other parts of my database but it doesn't seem to work on this form. It pulls the "claim_id" from a text field called "text222".

    Private Sub Command55_Click()
    On Error GoTo Err_Command55_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmaddclaimdocs"

    stLinkCriteria = "[claim_id]=" & Me![text222]
    DoCmd.openform stDocName, , , stLinkCriteria

    Exit_Command55_Click:
    Exit Sub

    Err_Command55_Click:
    Msgbox Err.description
    Resume Exit_Command55_Click
    End Sub

  2. #2
    Join Date
    Jan 2003
    Location
    Vietnam
    Posts
    188

    Re: troubleshooting filtering files

    Originally posted by leeroy

    stLinkCriteria = "[claim_id]=" & Me![text222]
    DoCmd.openform stDocName, , , stLinkCriteria

    if the opening form doesnt show any record, can you try this one:

    stLinkCriteria = "[claim_id]='" & Me![text222] & "'"

    this simply adds 2 single quotation marks to begin and end of the text value. this works for me sometime.

    hope this helps
    qha_vn

Posting Permissions

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