Empty Report

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

I have a query built for selecting Progress Notes with
these fields:
CounselorName
ClientName
Date
Comments

I also have a report called ProgressNotes that has a
subform based on the query.

To select the records I want in the report, I have a form
called frmProgressNotes that has a control box for
selecting a CounselorName, a control box for selecting a
ClientName, a text box for StartDate and one for EndDate.
These controls are referenced in the query.

When I run the query, a window opens asking for
CounselorName, ConsumerName and Start and End dates. After
entering the information, the query runs perfectly and
pulls up the data needed.

My problem is that when I use the form for entering the
data to select the ProgressNotes, the report opens, but
doesn't show the records. All I get is the Header
title "Progress Notes" and nothing in the detail section.

Thanks for any advice!
 
Firstly, rename the date field.
The word Date is a reserved word in VBA (for the system date), and the
ambiguity could be contributing to the problem.

Secondly, StartDate and EndDate are probably unbound text boxes? If so, set
the Format property to Short Date or similar so that Access recognises they
are supposed to be dates (and will not accept invalid dates).

Thirdly, if you are using code to supply the WhereCondition for an
OpenReport action, explicitly format the dates and supply the # delimiter,
e.g.:
strWhere = "Between " & _
Format(Me.StartDate, "\#mm/dd/yyyy\#") & " And " & _
Format(Me.EndDate, "\#mm/dd/yyyy\#")

If that does not solve the problem, please supply more information about the
ConselorName control. Combo box? What is the bound column? What is the data
type of the bound column?
 
Thanks Allen for your help! I formatted and changed the
Date field name as you suggested and that solved the
problem. I have one more question. In the report, the
dates are not printed in ascending order even though I
have the ProgressDate field in the query set to ascending
order. Any suggestions?
 
Open the report in design view.
Open the Sorting and Grouping dialog (View menu).
Specify the field(s) to sort by there (one per row).
 
Thanks again Allen for your help!!
-----Original Message-----
Open the report in design view.
Open the Sorting and Grouping dialog (View menu).
Specify the field(s) to sort by there (one per row).

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.




.
 
Back
Top