I design a report that will show all the records for a particular client and all the records do show in the report BUT when I try to search between dates than only half of the records are showing ....... records in the middle of the date range are missing and EndDate records also doesn't show. I use the following code on the OnClick Event of the OK button on my form
Code:
Private Sub Command4_Click() On Error GoTo Err_Command4_Click Dim stCriteria As String Dim stDocName As String stLinkCriteria = "([ClientNr]=" & Me.ClientNr & ") AND ([Date] Between #" & Me.BeginDate & "# AND #" & Me.EndDate & "#)" stDocName = "PersAmendmentMovByDate" DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria Exit_Command4_Click: Exit Sub Err_Command4_Click: MsgBox Err.Description Resume Exit_Command4_Click End Sub
Comment