Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 12th, 2005, 02:32 PM
Authorized User
 
Join Date: Jun 2004
Location: Raleigh, NC, USA.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automatically Applying Advanced Filter / Sort

I'm trying to sort the records of a form by an expression called
Val(ProvenienceNumber). The only way that I know how to do this is in Form view going to Records - Filter - Advanced Filter/Sort, entering the expression and filtering the records. How do I programatically get Access to do this on a OnLoad or OnOpen event so my clients don't have to do this every time they want to look at sorted records?

Thank you,

Brian


Reply With Quote
  #2 (permalink)  
Old November 14th, 2005, 08:55 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What is the record source of the Form? A query or table? If it is a query, then sort the query, and the form will reflect that sort.


mmcdonal
Reply With Quote
  #3 (permalink)  
Old November 14th, 2005, 01:49 PM
Authorized User
 
Join Date: Jun 2004
Location: Raleigh, NC, USA.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The recordsource on this form is a table.

Quote:
quote:Originally posted by mmcdonal
 What is the record source of the Form? A query or table? If it is a query, then sort the query, and the form will reflect that sort.


mmcdonal
Reply With Quote
  #4 (permalink)  
Old November 14th, 2005, 04:32 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You should be able to use the Order By field on the data tab of the form. Is this not working?


What are you doing by hand to filter the records? What expression are you entering?


mmcdonal
Reply With Quote
  #5 (permalink)  
Old November 24th, 2005, 04:18 PM
Authorized User
 
Join Date: Jun 2004
Location: Raleigh, NC, USA.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi mmcdonal,

Instead of using the Val() expression, I changed my text field into two separate number fields, and am sorting the fields by the two number fields.

Thanks for your help, though!

Bridog39

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 12 Try It Out: Applying Filter (pg 400) Deepeshk ASP.NET 3.5 Basics 2 July 12th, 2008 10:28 AM
Chapter 12 (page 400) Try It Out: Applying Filter Deepeshk BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 04:18 AM
Dynamic sort order or sort datatype kapy_kal XSLT 2 September 18th, 2007 02:10 PM
Macro/Date/Advanced Filter alexyss15 Excel VBA 1 March 30th, 2006 01:06 PM
how to sort cross tab.sort based on row total joxa83 Crystal Reports 7 March 2nd, 2006 09:12 AM



All times are GMT -4. The time now is 10:41 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.