Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Fitness 18    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Sort Order
Edwin Sulsters 

12 months ago
Hi Richard,
I think I missed somtehing.
When I add a new meal name, it will add it at the bottom and doesn't sort it by name.
In your example Joe's Coffee will be placed between Fish, Rice, Veg and zzzz.
Sami Shamma  @Reply  
             
12 months ago
Hi Edwin,
Whenever you add an item to an Access form, it will always be added at the bottom by default. It will only show up in the appropriate sorted location after the form has been refreshed, either by:
1. Closing and opening
2. Hitting the refresh key
3. Some VBA code to force it to refresh
Sami Shamma  @Reply  
             
12 months ago
Darrin That is option number 3.
Jeffrey Kraft  @Reply  
      
12 months ago
The code to requery I believe is in the part where he goes on about Description_AfterUpdate() that triggers the sort.  I'd like it to requery the MealListF when the Add to Meal... right now it doesn't requery and give us the calories and protien.
Richard Rost  @Reply  
          
12 months ago
Well, I can't recalculate the calories and protein if there are no calories and proteins, so we're going to get there. We got to deal with some issues today about how you can add a food item when a meal doesn't exist yet. So we're still getting there, folks, just be patient.
Edwin Sulsters OP  @Reply  

12 months ago
Jeffrey
I suppose this is the code in the Description_Afterupdate()
Dim TempID As Long
    
    Me.Dirty = False
    TempID = MealID
    MealListF.Form.Recordset.Requery

Well, the meal is added to the meal list, but it's not sorted.
Not even when I close and reopen the form.
Edwin Sulsters OP  @Reply  

12 months ago
In the Form_Load of the MealListF code I added  DoCmd.SetOrderBy "Description ASC" and now it sorts it whe the form is opened.
Jeffrey Kraft  @Reply  
      
12 months ago
One of my entries (for some reason) did sort. Maybe it shouldn't have.  I added the sort labels like the ones found on the FoodListF. I did it for no reason other than to do it.  

On mine I messed around with the MealListQry and set sort to assending. Obviously could do the same thing, and I just might.
I'm also adding a search field to see if I've already put the meal in before I decide to put it in a second time.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Fitness 18.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 8/8/2026 10:41:41 AM. PLT: 1s