Printing Database Records in Specific Order

I

imcdavid

I have a delivery service which is composed of various routes. The
route stops have been defined in database tables. Route sheets are
printed based upon these tables. However, I need to have the stops
print in an particular order/sequence; i.e. first stop, second stop,
etc. although these records are not in sequence order in their
table(s). My problem is that I must manually assign a sequence number
to each stop and there may be a hundred or more stops on a route which
changes as stops are added or deleted which would effect the
sequencing. How can I automate assigning a sequence number for
printing to each stop and have it automatically re-number the
sequencing as stops are added or deleted? Will I need to write a
query sort? Any suggestions will be appreciated. Thank you!
 
S

Steve Schapel

Imcdavid,

Unless there is data already associated with the stops that determines
their order, you will need to add a field specifically for this purpose.

Managing this sorting field manually is really a very practical way of
handling it. If you use numbers, they don't need to be sequential. You
could start by numbering them 5 - 10 - 15 - 20 etc, which allows the
intermediate numbers to be used in the event of stops being added to the
routes.

Having said that, it would certainly be possible to write code that
would allow you to click on an 'up' or 'down' button to move a stop's
sequencing number higher or lower in the sort order.
 

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