Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Appleton, Wisconsin, USA
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tripped up - Ordering Data in an Access Project (2000 SR1)

    I'm brand-spanking-new at working with Access Projects and I'm trying to sort the records in a View. <img src=/S/woops.gif border=0 alt=woops width=58 height=36> How do I do that? The View is the record source for a form in which I'd like to have the records ordered.

    Any good (free would be great!) online or book resources for newbies?

    Thanks,
    Angela

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Tripped up - Ordering Data in an Access Project (2000 SR1)

    In order to do sorting, you need to use a stored procedure - views don't allow sorting. The complication is that frequently stored procedures turn out to be not updateable. That means that if you want to use a form to update a table in a project, it may need to be unbound. That means you get to write quite a bit of code. There is however a ServerFilter and a ServerFilterByForm property that lets you do a fair bit of ordering and filtering of data. So you let the user determine the filter to get the record they want. A different way to do things, but sometimes attractive. As to resources, there aren't a great many - the SQL Server books online tell you most of what you need to know about the back-end. But the Help for Projects is very thin in 2000 - even worse in 2002. Helen Feddema's book Access 2002 Inside Out has a pretty good section on designing projects, though some of it doesn't apply to 2000. Also the Access Developer's Handbook by Litwin, Getz et al has a decent section. Bottom line is that lots of us are still trying to figure out the best way to do it, and often concluding that ODBC links or ADO links to SQL tables is faster and easier to develop in. Perhaps others will weigh in with differing opinions.
    Wendell

  3. #3
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Appleton, Wisconsin, USA
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tripped up - Ordering Data in an Access Project (2000 SR1)

    Thanks for the comments Wendell - dang this is frustrating! I know only enough SQL to be able to read and hack it a bit, not create stored procedures from scratch. I agree with you too on the Help in Access 2000 - it needs help! I'll have to try to find some sort of workaround...

    Any idea why, when I go into form properties, it gives me fields to set sort order and that sort of thing, but it doesn't work? Why do they even make it available?

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Tripped up - Ordering Data in an Access Project (2000 SR1)

    Well, I did a bit of experimenting in Access 2002 and found a way, but it may not work in Access 2000. Forms in projects have an OrderBy property which you can set, but simply opening the form doesn't do the sort. Once you've opened the form, you need to click in one of the fields you specified in the Orderby propert, and then click on either Tools/Sort or the Sort button on the toolbar, and it will sort the records at that point. Hope this helps.
    Wendell

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Tripped up - Ordering Data in an Access Project (2000 SR1)

    Sorting the form's recordset in code by setting the OrderBY property to the appropriate field name(s) and then setting OrderByOn = True works in Access 2000 as well as 2002.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •