How to check if you the WHERE condition in a report is working?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Aarmando
    New Member
    • Jul 2010
    • 7

    #1

    How to check if you the WHERE condition in a report is working?

    Hi All,

    I have a report where I use the Customer's Name to open a form that shows their contact info ID. I use their ID number for the WHERE condition. For a week it will work, but then it will only open to a New Record. The string was a leftover from a previous debugging exercise.

    Code:
    '_________________________________________________________________________
    '   Object: Contact Person Hyperlink
    '   Event:  On_Click
    '
    '--------------------------------------------------
    Private Sub ContactPerson_Click()
    Dim strID as String
    strID = Reports!rptCustomerList![CustomerID]
    
    DoCmd.OpenForm "frmCustDetails", acNormal, , "[Customer1.CustomerID]=[Reports]![rptCustomerList]![CustomerID]", , acWindowNormal,
    DoCmd.Requery ""
    
    End Sub
    I tried using different methods, but it will give me solutions for a couple of days before reverting to the same problem?

    Thanks
  • orangeCat
    New Member
    • Dec 2007
    • 83

    #2
    Why not create a query, you could even use the query as the source for a Form? Why not query a table to find the info you want? Why query a report?

    Comment

    Working...