By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,536 Members | 1,504 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,536 IT Pros & Developers. It's quick & easy.

Opening one database always restores a minimised database

P: n/a
Hi

I have an Access database that I use to keep track of hours I work on
development. The database is always open and minimised.

An annoying problem is that whenever I open a database I am working on
through a shortcut, the time tracking database window gets restored before
the one I am opening actually opens. It does stay behind the one I am
working on but I have to minimise it again if I want to keep the desktop
uncluttered.

Is there any way of stopping the minimised one restoring?

Jeff
Dec 14 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
When I set the target property of the shortcut to:

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"C:\Documents and Settings\Lyle Fairfield\My
Documents\Access\downloads.mdb"

the minimised window does not restore.

Dec 14 '05 #2

P: n/a
Yep, that works. Pity is that for each project I have a single shortcut to
the folder where the files are and I rely on the file association to open
the database files.

This means that I have to create a shortcut to each database file in all my
projects.

Oh me, oh my...life is so hard.

Jeff

"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
When I set the target property of the shortcut to:

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"C:\Documents and Settings\Lyle Fairfield\My
Documents\Access\downloads.mdb"

the minimised window does not restore.

Dec 15 '05 #3

P: n/a

"Jeff" <je************@asken.com.au> schreef in bericht news:43**********************@per-qv1-newsreader-01.iinet.net.au...
Yep, that works. Pity is that for each project I have a single shortcut to
the folder where the files are and I rely on the file association to open
the database files.

This means that I have to create a shortcut to each database file in all my
projects.

Oh me, oh my...life is so hard.


You might consider using a timer event in your timetracker db to minimize.

Or maybe you have more versions of Access installed? (A lot of us have I guess)
It might help when you use the timetracking in another version.

Arno R
Dec 15 '05 #4

P: n/a
This code might make that easier. All you would have to do is change
the arguments assignment to the name of each db. It won't work, I
think, if you have disabled Windows Scripting.

CreateShortCut is a little gnarly. Its usage is not the same as that of
Shell. So you might have to modify it a bit to get it to do exactly
what you want.

Sub temp()
Dim ws As Object
Dim sh As Object
Set ws = CreateObject("WScript.Shell")
With ws
Set sh = .CreateShortcut("C:\Documents and Settings\Lyle
Fairfield\Desktop\blah.lnk")
With sh
.TargetPath = SysCmd(acSysCmdAccessDir) & "msaccess.exe"
.WorkingDirectory = "C:\Documents and Settings\Lyle
Fairfield\My Documents\Access"
.Arguments = """Copy of tests.mdb"""
.Save
End With
End With
Set sh = Nothing
Set ws = Nothing
End Sub

Dec 15 '05 #5

P: n/a
What the heck I'm waiting for some people who are late:

Private Const wd As String = "C:\Documents and Settings\Lyle
Fairfield\My Documents\Access"

Sub temp()
Dim ws As Object
Dim sh As Object
Dim db As String
Dim tp As String
tp = SysCmd(acSysCmdAccessDir) & "msaccess.exe"
Set ws = CreateObject("WScript.Shell")
With ws
db = Dir$(wd & "\*.mdb")
Do While Len(db) > 0
Set sh = .CreateShortcut("C:\Documents and Settings\Lyle
Fairfield\Desktop\" & Left(db, InStr(db, ".")) & "lnk")
With sh
.TargetPath = tp
.WorkingDirectory = wd
.Arguments = """" & db & """"
.Save
End With
db = Dir$()
Loop
End With
Set sh = Nothing
Set ws = Nothing
End Sub

This should do all your mdbs in the folder specified. But, please,
don't use this if you're not reasonably familiar with VBA and
UNDERSTAND THAT IT'S GOING TO PUT A WHOLE BUNCH OF SHPOTCUTS ON YOUR
DESKTOP.

Dec 15 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.