Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Difference in Code 2003 v 365
John Miller 
       
4 years ago
I have some problem I have updated an Access 2003 DB to Office 365. I am have a problem with code that works in 2003 but not in Office 365. here are the codes.
Access2003:
Private Sub Combo153_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[Order_Num] = '" & Me![Combo153] & "'"
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub

Access 365
Private Sub Combo153_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object

    Set rs = Me.Recordset.Clone
    rs.FindFirst "[Order_Num] = '" & Me![Combo153] & "'"
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

What is supposed to happen is this code is attached to a combo box "After Update" property and its takes which ever order is selected in the combo box the main form, where the combo is located, updates the form to the chosen record. It works in 2003 but not in 365. Why?
Alex Hedley  @Reply  
           
4 years ago
What happens instead?
Is the AfterUpdate actually called?
John Miller OP  @Reply  
       
4 years ago
Sorry for delay in answering, planning my mothers 100th birthday. What happens is it does nothing. Yes it activates on "After Update" but it does not execute.
Alex Hedley  @Reply  
           
4 years ago
Congrats

How do you know?
Did you add a MsgBox?
John Miller OP  @Reply  
       
4 years ago
I went to the code window from the form in design view and placed the brown dot on the left, not sure what to call it, to the line that starts "rs.FindFirst "[Order_Num] =......... '" when I go back to the main screen and select a different item in the combo box and press tab key. This opens the code to the above line. I then select f8 key to move to the next line. I see Values in fields that should have values but it does nothing after that.
John Miller OP  @Reply  
       
4 years ago
Well I got it figured out. Here is the code I came up with:
    ' Find the record that matches the control.
    Me.RecordsetClone.FindFirst "[LRSID] = " & Me![Combo153]
    Me.Bookmark = Me.RecordsetClone.Bookmark
The Combo Box numbers change depending on which way the list sorted. By changing the Combo number to match the sort order all work. Thank you for your assistance.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

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: 5/6/2026 8:49:06 AM. PLT: 1s