Sorting Report

D

Debra Ann

I have a report that is looking at a table. Within the report, I have a
textbox that equal the combination of a bunch of fields in the table:

=[nonisoDocIdentifier] & "-" & [nonisoUnitIdentifier] & "-" &
[nonisoDisciplineCode] & [nonisoDocumentTypeCode] & "-" & [nonisoSSCCode] &
"-" & [nonisoElevationNumber] & "-" & [nonisoDrawingSize]

I want the report to sort by the above combination of fields. How do I do
that. When I do OrderBy =[TextBox] and OrderByOn = Yes, it comes up with an
error.

thanks,
 
F

fredg

I have a report that is looking at a table. Within the report, I have a
textbox that equal the combination of a bunch of fields in the table:

=[nonisoDocIdentifier] & "-" & [nonisoUnitIdentifier] & "-" &
[nonisoDisciplineCode] & [nonisoDocumentTypeCode] & "-" & [nonisoSSCCode] &
"-" & [nonisoElevationNumber] & "-" & [nonisoDrawingSize]

I want the report to sort by the above combination of fields. How do I do
that. When I do OrderBy =[TextBox] and OrderByOn = Yes, it comes up with an
error.

thanks,

Reports should be sorted in it's Sorting and Grouping dialog.

Create a query that will be the record source of the report.
In that query, add a new column.

SortThis:[nonisoDocIdentifier] & "-" & [nonisoUnitIdentifier] & "-" &
[nonisoDisciplineCode] & [nonisoDocumentTypeCode] & "-" &
[nonisoSSCCode] & "-" & [nonisoElevationNumber] & "-" &
[nonisoDrawingSize]

Save the query.

Open the report in Design View.
Change the report's Record Source to this query.
Save the change.

Then click on View + Sorting and Grouping
Set the Field/Expression drop down to [SortThis]

Then replace that current text box with the above expression in the
report with a control bound to the SortThis field in the query.
 

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