Results 1 to 6 of 6
  1. #1
    Triscia is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    8

    Macro will not sort records

    I have a macro that I based off a query that is sorted in ascending order, but when the macro opens the form it doesn't sort like the query does. Does anyone know what is going on with the Macro. Thanks!

  2. #2
    offie is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    176
    How did you make this macro/what is it? WHy dont you just sort you query? In the Design View there is a row called "Sort By", select ascending (if you sort more than one field it will sort the farthest one to the right first and move its way to the left)

    If that's not what you want please post more information (code/screen shot etc.)

  3. #3
    Triscia is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    8
    I have the query set to sort ascending. When I created the macro I have the Macro to open the Form, with the name of the form in the Form Name, I have the view set to Form and then I put the query name in the Filter Name, but when it opens the form it doesn't sort the records. It opens the records that I need, but they are not sorted. It is weird why it doesn't sort like the query it is based off of.

  4. #4
    offie is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    176
    That's werid. I don't normall work with macros, but with VBA, so what is it exactly that you are trying to do? where do you specify this macro to run? How do you want your data in the form? Sounds like it a form issue not a macro issue, when you open the form without the macro is is still not sorted?

  5. #5
    Triscia is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    8
    It is very weird. I have the same macro in another database that I copied from this one and the macro works and sorts in ascending order. I am at a loss. It'll pull all the records just won't sort them.

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    I would look at the form's properties and check the Order By property. Make sure it is blank. If it is blank when you first look, try putting something in there to your liking.

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

Similar Threads

  1. Sort Order for Records in Subforms
    By The Professor in forum Forms
    Replies: 4
    Last Post: 06-29-2013, 06:39 AM
  2. Unable to sort records in database
    By SiyarK in forum Access
    Replies: 6
    Last Post: 02-07-2013, 02:22 PM
  3. Checkbox to sort records
    By homerj56 in forum Programming
    Replies: 1
    Last Post: 09-09-2010, 09:53 AM
  4. Macro Button to Sort Field A-Z
    By rdirosato in forum Access
    Replies: 1
    Last Post: 03-11-2010, 10:32 PM
  5. Macro to Run RemoveFilter/Sort
    By Ryan in forum Access
    Replies: 0
    Last Post: 08-30-2009, 01:41 AM

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