Retrieving records in order

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

Guest

Hello,

In my customer DB, i have a select query that retrieve invoices.The invoices
have transactions such as items that are repeated and so the invoices are
repeated as well to identify the transactions and different dates they
occurred.How do you group the invoices so they appear in order instead of
through out the query?Is there a filter that does this?
Thanks
 
You can use the Sort row in the Query interface to nominate the sorting /
ordering you want. This is translated into the ORDER BY clause in the SQL
String.

Check Access Help on sorting / ordering.
 
I don't understand your data structure from your description. Knowing how
the data is stored is critical to knowing how to retrieve it.

Are you saying that your "order detail" (transaction) records include the
"order" (invoice) IDs, and that you have a one-to-many relationship between
invoice and transactions? Do you have one table or two to hold these?

If you are trying to build a report (you didn't mention if this was the
case), you don't need to worry about order in the query -- you have to set
Sort/Group order in the report.

If you are only concerned about the query, put the invoiceID before the
transactionID in the query definition grid, and use the Sort field to sort
as desired.

Or have I totally misunderstood?
 

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

Back
Top