Results 1 to 5 of 5
  1. #1
    tweety is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2012
    Posts
    126

    Sort Records Via Date (Newest first)

    Hi

    I have a form with subform. the subform has the date of sales, and the main form just holds and the customer details. My question is how and where do i set the records to show the newest sales first, i.e sort date.

    thanks in advance



    Click image for larger version. 

Name:	Date.png 
Views:	12 
Size:	30.0 KB 
ID:	10897

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Do you have a CustomerId field in the Purchase table?

    You need to Relate Purchases to Customers.

    Usually the model has Customers Orders OrderDetails and Products.
    CustomerId is a FK stored in Orders


    Can you show us your Tables and relationships as a jpg?

  3. #3
    tweety is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2012
    Posts
    126
    hi

    i have attached a image of the table links, all the tables are linked, and the system can record sales and store purchased goods, the next step i would like to do is setup stock control.

    thanks


    Click image for larger version. 

Name:	tables.png 
Views:	5 
Size:	36.2 KB 
ID:	10902

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Have you linked masterFields (Customer CustomerId) and Child fields (Sales CustomerId)?
    Have you sorted by Dates of Sales descending?

    Can you tell us more about your Sales and Purchases and Suppliers?

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Maybe I'm missing something, here, but it sounds as if you simply want to sort the Subform by your date field, in reverse order. If this is the situation:

    • Open the Form the Subform is based on in Form Design View
    • Go to Properties - Data
    • In the Order By Property enter: [YourDateFieldName] Desc
    • Make sure that the Order By On Load Property is set to 'Yes'

    You should now be set!

    Linq ;0)>

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 04-27-2012, 05:27 PM
  2. Sort by date and year
    By Douglasrac in forum Queries
    Replies: 13
    Last Post: 04-07-2011, 10:02 AM
  3. Sort oldest to newest on form
    By Desstro in forum Forms
    Replies: 6
    Last Post: 09-18-2010, 05:35 AM
  4. Checkbox to sort records
    By homerj56 in forum Programming
    Replies: 1
    Last Post: 09-09-2010, 09:53 AM
  5. Query From Newest Date
    By SSgtJ in forum Queries
    Replies: 2
    Last Post: 01-21-2010, 01:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums