Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Event Countdown < Append Mistake #2 | Sort Multiple >
Back to Event Countdown    Comments List
Use this Daily But Upload Images   Link   Email  
Sandra Truax 
I love this Event List. I have linked the table to almost all my other databases set it as the Main Form that opens whenever I open the other database so I don't get engrossed in programming and forget my ToDo stuff!  

My problem is, I am constantly updating the main Event database, which means I have to delete the forms and query in the other databases, and import them again each time I tweak it.  

Is there some way I can delete the three forms, and one query, and then import them again by using VBA with an On Click Event?  

I'm thinking I can delete the forms with
Docmd.DeleteObject acform, "Name of form", and the same for the query, but can't figure out HOW in the WORLD to inport the forms and querys again from the Event database.

I'm sure you can, because Richard always says "Of course you can!" to all questions. :)
Sandra Truax
In case anyone else is interested, this is the code I put in the on click button to delete the forms and query, and to run the saved Import for the forms and query from the other database.

    DoCmd.DeleteObject acForm, "EventEditF"
    DoCmd.DeleteObject acForm, "EventF"
    DoCmd.DeleteObject acQuery, "EventQ"
    DoCmd.RunSavedImportExport "Import-Events"
Kevin Robertson
Use DoCmd.TransferDatabase

See screenshot for an example.
Kevin Robertson

Sandra Truax
Thank you Kevin. Would you explain the last line? Is the first ObjectName the name of the database I'm coming from, and the second ObjectName the name for the current database?
Kevin Robertson
That is correct. Here is the full syntax.

expression.TransferDatabase (TransferType, DatabaseType, DatabaseName, ObjectType, Source, Destination, StructureOnly, StoreLogin)

https://learn.microsoft.com/en-us/office/vba/api/access.docmd.transferdatabase
Sandra Truax
Thank you Kevin

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

 
 
 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 2/24/2024 12:31:49 AM. PLT: 0s