Sort rows in a sub-form

D

Dennis

Hi,

I'm on Access via Office 2003 / XP.

I have a continuous sub-form which I use for data entry. When the initial
information is displayed on the sub-form, I want it sorted by Date and by
primary key.

The sub-form source is a query, but I don't want to change the query because
other process use it.

I have put "By Date by ProjDetNo" in the Order By property of the sub-form,
but that does not sort the rows correctly.

What do I need to do to sort the rows by Date by ProjDetNo?

The name of the table is tblProjectDet.

Thanks for your assitance.
 
J

Jeff Boyce

Dennis

If you need a query that sorts correctly, why not create one?

If you have a query that already gets the correct records (and is used
elsewhere), you could create a new query, based on that first one, then add
the correct sorting in the new query, and use IT for your source.

JOPO (just one person's opinion)

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
K

KARL DEWEY

Did you enter the two field names only in the Order By property of the
sub-form without quotes and separated by a comma?
 
D

Dennis

Jeff,

I could create a new query but all that does is increase my future
maintenance. As much as possible, I want to reuse working code which
decreases development time and future maintenace.

Karl,

I did as you suggested and it did not work. Here is a copy of the properties:

Record Source: qrytblProjectDet
Filter:
Order By: Date, ProjDetNo
Allow Filters: Yes
Default View: Continuous Forms

Any other suggestions?

Dennis
 
K

KARL DEWEY

I use 2007 and it works for me. Do you think that field name 'Date' might
be causing a problem? What sort order are you getting?
 

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