report order

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an input form that takes product information. I have a button that
prints a report of the information shown on the form in a invoice type
layout. The problem is, whatever order the products are listed in on the
form is opposite on the report. For example, the first line of product info
on the forms prints as the last line on the report. is there any way to
changes this so the order you see on the Form is how the report will print it?
Thanks!
 
Create a query that has the appropriate ORDER BY clause in it to use for the
form. While you can use that same query for the report, you can't be
guaranteed that the report will respect the ORDER BY, so you have to specify
the same ordering in the Grouping and Sorting in the report.
 
nikki,
Sorting on a report is done through the Sorting and Grouping Dialog box in Design mode.
 
the sort order on the form in question is totally ignored by the
report. You have to specify a sort order for that section in the
report. check the OrderBy (should be the field you specify) and
OrderByOn (should be Yes). You could do it this way...

Private Sub Report_Open(Cancel As Integer)
Me.OrderBy = Forms!frmOpenReport!cboOrderBy
Me.OrderByOn = True
End Sub
 
Thanks for the response,
I haven't really sorted anything thusfar, I am a little confused on where I
need to start. My form has multiple fields from a number of tables, with 2
subforms. the report takes info from the entire form. What do you think I
should do? I don't know what steps I need to take. Thank you very much!
 
Back
Top