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 Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Save Close and Go to a Different Form Button
Wendy Hamrick 
      
12 months ago
I thought I had just watched a video where Richard walked through and gave a VBA code to 1) save a form, 2) close the current form you just saved and then 3) open a new form all upon the click of the button. But I cant find it again.
Can anyone assist please?
I already have a save and also a close button. I am needing the closure of the form to take the user back to the main menu when they close the form they are in
Sami Shamma  @Reply  
             
12 months ago
Remind me Wendy to answer this question for you today.
Sandra Truax  @Reply  
          
12 months ago

See if this works for you. I did a quick search for his video, but have not found it yet, but try this code and see if it does what you want.

    ' Close the current form
    DoCmd.Close acForm, "CustomerListF", acSaveYes

    ' Set focus to the ScanInBtn on MainMenuF
    DoCmd.SelectObject acForm, "MainMenuF"
    Forms!MainMenuF!ScanInBtn.SetFocus
Wendy Hamrick OP  @Reply  
      
12 months ago
Sami Didnt see this in time :(
Wendy Hamrick OP  @Reply  
      
12 months ago
Sandra Thank you I will try it!
Wendy Hamrick OP  @Reply  
      
12 months ago
Sandra
Hi Sandra, That did not work for me :(  - not sure if I did something wrong or not.
This did work for me though:
Private Sub Command276_Click()

    Dim strFormName As String
strFormName = "00NewstudentSetUpF"
' Close the form
DoCmd.Close acForm, strFormName, acSaveYes
' Reopen the form
DoCmd.OpenForm strFormName, acNormal
End Sub
Wendy Hamrick OP  @Reply  
      
12 months ago
This is what I ended up creating -
Wendy Hamrick OP  @Reply  
      
12 months ago

Sami Shamma  @Reply  
             
12 months ago
I have sent you an email.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access 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 10:34:16 PM. PLT: 0s