Hidden Info: How to Get to Access's Path
When my sons were considerably younger than they
are now (just out of college, and a sophomore in
college), we used to play an early videogame called
Mario Brothers. The idea of the game was to rescue a
princess trapped in a castle. Of course, the real
action took place along the way where
there were many obstacles. The game usually took
quite a bit of time to complete, and my kids were
always much better at it than I was. One secret to the
game involved a shortcut that avoided most of the
obstacles and led to a much faster solution.
While playing the game, a casual inspection would in
no way indicate that there was a secret door that led to
a shortcut and a series of interesting places. The only
way to know of this obscure path to hidden lands was
through knowledge of the game or by information
picked up from others.
In a like way, there are hidden doors in Access that
lead to all sorts of information. That's what we'll be
talking about this month: A door that can lead you to
information that you might not otherwise be able to
easily learn - SYSCMD.
The Path to Access |
 |
Last month, I told you about a way of recovering from
corruption, a process called decompiling and
recompiling. To decompile, you have to know where
the Access program lives in your system. If you
installed Access yourself on your local C drive, this is
a relatively straightforward process. However, if
someone else installed the program and put it in an
unusual spot, or if the program lives on a network, it
may not be easy to figure out where the program is
located.
If you start Access from an icon, you can right-click on
the icon, choose properties, and then choose
find target. However, if your icon is pointing to a
specific database file rather than to the Access
program, you'll
get the path to the file rather than to the master Access
program.
Getting to the Access path is relatively simple if you
know the SYSCMD trick. Luckily, the process is
straightforward.
Open up any database file using Access. Press and
hold the control key, then press release the G Key.
This will bring you to a code window and land you in
the immediate pane. From here, you can give
commands to Access and get information. To do this,
you type a question mark followed by a command.
In this case, type
? syscmd(acSysCmdAccessDir)
and then hit return. If all goes well, you'll get the path to
Access. You can then use this to build the command
to decompile your application as I reviewed in last
month's issue.
|
SYSCMD Commands |
 |
Once you are in the window, I would urge you to
explore a little bit by typing syscmd followed by an
open
parenthesis. When you do this, you will see a variety of
commands that you can give, each of which will
provide you with information. After you've
explored a bit, you will want to store this feature for
future reference. It will be another handy tool in your
toolbox.
|
|
Tip of the Month: Redock the Immediate Window |
|
If you have done any work at all in the code window
and have used the immediate pane, you may find from
time to time that the immediate window becomes
undocked. It usually lives in the lower right-hand
corner of the screen when you're in code. However,
periodically, you might find that you've dragged it away
from its home, and the window floats around getting in
the way.
This is really annoying behavior, and getting it back to
its home spot is a really persnickety process that
requires a very precise placement and a specific
sequence of keystrokes. Luckily, there is a much
easier way to redock the window. All you have to do is
grab the title bar of the immediate window, then drag it
the very bottom of the screen so that is just about out
of sight.
At that point, you will see that the immediate window
jumps back into its normal spot, at which point you
can release the mouse.
|
|