Change Report to show all records

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
 
K

Ken Snell [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top