Results 1 to 11 of 11
  1. #1
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    Sorting records on a tabular form

    Hi



    have a table based on a query with a view set to continuous -datasheet view

    in the query I have set the order on a field called forename to a-z and when I run the query it is shown a-z

    but when I open the form which is based on the query the order is not a-z is there a way of ordering the results?

    thanks

    Ian

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    OK terminology...
    You have a query based on a table. Queries can only be in continuous datasheet view when executed.

    A form can be bound to a table or query.


    but when I open the form which is based on the query the order is not a-z
    I have never seen this problem.
    Are you sure the form is bound to the query and not the table??

    Would you post the SQL of the query?

  3. #3
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    query code

    Hi

    my query is below

    Code:
    SELECT tblDeceased.GraveID, tblDeceased.Mlink, tblDeceased.Plot, tblDeceased.GraveNo, tblDeceased.Forenames, tblDeceased.Surname, tblDeceased.Age, tblDeceased.YearOfDeath
    FROM tblDeceased
    WHERE (((tblDeceased.Surname) Like "*" & [Enter a Surname]))
    ORDER BY tblDeceased.Forenames;
    
    
    If I look at the properties of the form the record source is hown as qrySurnameSearch which is the name of my query= I assume that iswhat you mean by bound to the query?

    thanks

    Ian

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    If I look at the properties of the form the record source is hown as qrySurnameSearch which is the name of my query= I assume that iswhat you mean by bound to the query?
    Yes, just wanted to make sure the query was being used.

    SQL looks good also.



    Could be corruption.
    Try creating a new form, set the record source to the query, add the fields from the query to the form and view the form. Does the same effect happen?

  5. #5
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    just got back to this

    I created a new query and a new form based on that query.

    If I double click the query then every record is shown sorted by forename ascending number.

    If I run the form is isn't

    any other ideas?

    thanks

    Ian

  6. #6
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,844
    it could be because the query you are using is a parameter query, prompting you for a surname when the form opens.

    For test purposes, remove the where clause and see if you have the same problem.

  7. #7
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    thanks for the quick response

    I removed the clause and it made no difference when running the query it's perfect , when running the form it's no longer sorted.

    thanks again

    Ian

  8. #8
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,844
    try setting the form order by property to Forenames

    If that doesn't work, suggest upload the db containing the table, query and form

  9. #9
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    thanks for the idea and yes that cured the problem!!!

    Must have had a senior moment as I thought I'd read you couldn't sort or group a form

    thanks million

    Ian

  10. #10
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    note to self:

    remember that when creating a form if you use the Wizard then Access adds a sort property to the form which appears to take precedence over any table sort

    5 hours and lots of help !!! to learn this lesson

    Ian

  11. #11
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,844
    note to self - don't use the wizards if at all possible - it can take as long to undo all the defaults you don't want as it would to have created the form manually

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

Similar Threads

  1. Sorting records from a single-record form?
    By Ally1205 in forum Forms
    Replies: 2
    Last Post: 01-28-2014, 11:15 AM
  2. Replies: 5
    Last Post: 07-09-2013, 11:16 AM
  3. Sorting a form's records in order by date.
    By slikbaz in forum Access
    Replies: 3
    Last Post: 11-20-2010, 01:11 AM
  4. Tabular Form
    By Evgeny in forum Forms
    Replies: 0
    Last Post: 04-26-2010, 08:39 PM
  5. Remove items from Tabular Form
    By JoshS in forum Forms
    Replies: 3
    Last Post: 04-26-2010, 02:18 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