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 
Anoying Security Messages
Eduardo Benaim 
     
2 years ago
I have Two Access applications.
I am opening the second access Application with a Button in the First.
The command is:

Application.FollowHyperlink TempVars("myDesktop") & "\Calendar\Calendar.accdb"

Calendar is Richards Calendar App which I keep in a Folder at the Desktop (Trusted Location)
I keep getting the annoying MS Safety message every time I wish to open the Calendar.
I remember Richard talked about a way to circumvent this.
I don't want to add all the Calendar Files to the First App. I rather keep them separate.
Eduardo Benaim OP  @Reply  
     
2 years ago
Maybe Shell?
Eduardo Benaim OP  @Reply  
     
2 years ago
I was too quick to ask. I remembered the answer with Shell.   It works. No Warnings

Dim shellApp As Object
Set shellApp = CreateObject("Shell.Application")
shellApp.ShellExecute TempVars("myDesktop") & "\Calendar\Calendar.accdb"
Set shellApp = Nothing
Kevin Robertson  @Reply  
          
2 years ago
How are you getting your Desktop Path into the TempVars()? Are you hard coding it with the full path?
I like to do it like this so the Desktop can be found on any PC running the database.

    Dim Username As String
    
    Username = Environ$("username")
    TempVars("DesktopPath") = "C:\Users\" & Username & "\Desktop\"
    MsgBox TempVars("DesktopPath")
Eduardo Benaim OP  @Reply  
     
2 years ago
I created  TempVars("myDesktop") so I could use it everywhere.
(This happened right after Ricks Lesson on tempvars vs. Global Constants.
"DeskTopPath" can not be a Global Constant because every computer has a different path to its desktop.
So the Key is the Public Function DeskTopPath(). This returns the current computers path to the Desktop.
And I run TempVars in the First Form opening in my Application.


Place it at the OnLoad of the First Form
'----------------------------------------
Private Sub Form_Load()
TempVars("myDesktop") = DeskTopPath()
End Sub
'----------------------------------------


' Place in "PublicMod"
'---------------------------------------------------------------------
'Public Function DeskTopPath()
'---------------------------------------------------------------------
Public Function DeskTopPath() As String
DeskTopPath = CreateObject("WScript.Shell").SpecialFolders("Desktop")
End Function
'---------------------------------------------------------------------
Eduardo Benaim OP  @Reply  
     
2 years ago
So it is really One line of code
DeskTopPath = CreateObject("WScript.Shell").SpecialFolders("Desktop")

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/8/2026 6:54:35 PM. PLT: 1s