Change Report to show all records

  • Thread starter Thread starter Bob Vance
  • Start date Start date
B

Bob Vance

This report code is showing me just the latest date [dtDate], I want to
change it so all Dates show.....Thanks Bob

Private Sub Report_Open(Cancel As Integer)
Category.ControlSource = "='" & Form_frmMain.cmbRemarkOrderAll & "'"

Me.RecordSource = "SELECT tblRemarks.dtDate, funGetHorse(0,
qryCategory.HorseID,false) AS HorseName1, " _
& " tblRemarks.Category, tblRemarks.Remark FROM tblRemarks, qryCategory
WHERE qryCategory.HorseID " _
& " = tblRemarks.HorseID And qryCategory.RemarkID1 = tblRemarks.RemarkID
" _
& " and tblRemarks.Category='" & Form_frmMain.cmbRemarkOrderAll & "'" _
& " ORDER BY tblRemarks.Remark ,tblRemarks.dtDate , tblRemarks.Category
;"

Debug.Print Me.RecordSource
End Sub
 
I don't see anything in the query's SQL statement that would appear to be
limiting the records based on the dtDate field's value. So, I am guessing
that one of the other criteria are limiting the query's records. Try
deleting the other criteria, one at a time, to see when the query returns
all the records that you expect. Then investigate if that criterion's effect
makes sense for the data in the tables, and whether you need that criterion
or can modify it in some way.
 
Back
Top