Parameter query automation (1 Viewer)

Isaac

Lifelong Learner
Local time
Today, 10:46
Joined
Mar 14, 2017
Messages
8,778
You used accessapp instead of app! So try that with .echo

I think VBS definitely has its uses for complex tasks but for something as 'simple' as this, I'd personally just start Access with a macro switch as previously suggested
++ what Isla Dogs said .... or at least, I always believed that once having created an application variable (in vbs or whatever), "everything" downstream was available.
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 13:46
Joined
Apr 27, 2015
Messages
6,367
you used accessapp instead of app! So try that with .echo
I did, typo on my part, but the results are the same.
Strange, I do not get to see hide or hare of Access using that code? :unsure:
Using your code DOES in fact make the "flicker" much shorter, but it's still there. I'm running it all from a Citrix VDI session so I wonder if that makes a difference?
 

isladogs

MVP / VIP
Local time
Today, 18:46
Joined
Jan 14, 2017
Messages
18,246
OK I thought I'd test rather than guess...

I agree that VBS doesn't like the app.visible = true statement
However app.echo False works fine - NOTE no equals sign here

So this simple VBS script worked fine for me:

Rich (BB code):
Dim strFilePath, app

strFilePath = "Full path to database"

Set app = CreateObject("Access.Application")
app.UserControl = True
app.OpenCurrentDatabase strFilePath
'app.Visible = True 'OMIT - This causes a script error

MsgBox "Test message 1",,"TEST1"
app.Echo False

MsgBox "Test message 2",,"TEST2"

app.Echo True

app.CloseCurrentDatabase
app.Quit
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 13:46
Joined
Apr 27, 2015
Messages
6,367
Well I didn't get an error this time using objAccessApp.Echo False, put the flicker is still there. Did you run a Sub/Function when you tested this?
 

isladogs

MVP / VIP
Local time
Today, 18:46
Joined
Jan 14, 2017
Messages
18,246
I only get flickering where doing the same actions within the Access app itself causes flickering. For example where there is a timer event.
If you are attempting this over a remote connection, then all bets are off.
 

Users who are viewing this thread

Top Bottom