Hi,
I have a One to Many relational database, based on two Tables (Customers and Invoices). One Customer Record can be linked to many Invoice Records.
The Invoices Table is displayed in a Subform on the Customer Form. As you browse through the Customer Records, the Invoice Records for the relevant customer are displayed in the Subform - this part works very well. Obviously, the Subform displays only one Invoice Record at a time, but as each customer can have several or more invoices, my issue is this - how do I determine in what order the Invoice Records are displayed in the Subform?
For example, if a customer has 20 invoices, (only the first of which will be displayed in the Subform) how do I force them to be displayed in a particular order as I cycle through them? I'd like them to be displayed in date order (using the Date field) showing the latest Invoice Record first. But equally they could be sorted by the Invoice Number field, starting with either the lowest or highest number first - if only I knew how it could be done. Currently they appear to be just random in their sort order. The Invoices Table behind the Subform is sorted by the Invoice Number field, but this isn't reflected in the order in which they are being displayed in the Subform.
There doesn't seem to be a Property for the Subform Control that I can set, that will determine in what order the Records for the Subform will be sorted. I'd really appreciate some help with this if anyone has some ideas.
Prof.