.bat file alerts in access

John Sh

Active member
Local time
Tomorrow, 03:34
Joined
Feb 8, 2021
Messages
589
I am running a .bat file with application.followhyperlink from an access form and getting warning messages.
Application.displayalerts seems to not work in access vba.
Is there an alternative command in access vba or am I missing reference?
 
The .BAT file should perhaps contain ECHO OFF? Do a search for "Run .BAT file silently" to see MANY possible solutions, at least one of which might help you.
 
Try using the shell command instead.
 
The .BAT file should perhaps contain ECHO OFF? Do a search for "Run .BAT file silently" to see MANY possible solutions, at least one of which might help you.
Thanks.
I already had Echo off. Tried @echo off, no change.
I'll try the shell option.
 
Try using the shell command instead.
The shell is better but still get the message "can't verify who created the file"
Looks like I might have to try and digitally sign the .bat file.
 
Why do you need the bat file to run the followhyperlink, out of interest?
 
Why do you need the bat file to run the followhyperlink, out of interest?
The bat file isn't running the hyperlink, it's the other way round.
In fact I am now using the shell to run the bat file.
I have built an auto-update function that quits the current Access iteration immediately after the bat file starts.
The bat file then does the housework to bring the new file into play.
As for the warning messages, I think I have fixed that by registering the network location as a trusted location.
I haven't tested this yet but indications are this is the fix.
 
The bat file isn't running the hyperlink, it's the other way round.
In fact I am now using the shell to run the bat file.
I have built an auto-update function that quits the current Access iteration immediately after the bat file starts.
The bat file then does the housework to bring the new file into play.
As for the warning messages, I think I have fixed that by registering the network location as a trusted location.
I haven't tested this yet but indications are this is the fix.
Oh, I misunderstood. Did it not let you continue, when you get the warning, or did it just stop it completely?
 
Oh, I misunderstood. Did it not let you continue, when you get the warning, or did it just stop it completely?
The bat file continued to run after the appropriate responses were clicked.
I have tried adding "file://" as a prefix in followhyperlink, running the bat file via the shell and setting the network location as a trusted site.
Some of these methods reduced the warnings to one message but there was always a warning of some sort.
In the end I converted the bat file to an executable file. I still have the cmd window as an indicator that things are happening, but no warnings.
So I am back to followhyperlink and all is good.
 

Users who are viewing this thread

Back
Top Bottom