Open Acc2K Database Exclusively

T

Tony

Hi All,

I have an Access database that we're using to pull information from a
Progress database. We pull the data in, massage it, and the results end up
being printed on employee's checks. Two users use the database for this
function and a third user does straightforward data entry. The process of
getting the data on the checks is complicated, involving looping through a
recordset and printing a TIF image of the output. Because it's complicated
and deals with payroll, I'd like to give the users that run the payroll
function exclusive access when they open the database.

Currently I'm testing using the /excl switch in a shortcut and am using code
found here http://support.microsoft.com/?kbid=210359 to see if the database
is opening exclusively. In addition to this test, I have a second machine
where I log in as a different user and attempt to open the database. So
far, I've had no luck. The code from MS's site always tells me that the
database is not being opened exclusively and I can always open the database
from the second machine. The shortcuts I've set up on both machines are set
up like this:

TARGET: \\pathToDatabaseFolder\database.mdb /excl
START IN: \\pathToDatabaseFolder

The path is the UNC path and the clients are running Access2K on a Windows
network.

Can anyone point out what I'm missing?

Thanks & Ciao,

Tony
 
D

Dirk Goldgar

Tony said:
Hi All,

I have an Access database that we're using to pull information from a
Progress database. We pull the data in, massage it, and the results
end up being printed on employee's checks. Two users use the
database for this function and a third user does straightforward data
entry. The process of getting the data on the checks is complicated,
involving looping through a recordset and printing a TIF image of the
output. Because it's complicated and deals with payroll, I'd like to
give the users that run the payroll function exclusive access when
they open the database.

Currently I'm testing using the /excl switch in a shortcut and am
using code found here http://support.microsoft.com/?kbid=210359 to
see if the database is opening exclusively. In addition to this
test, I have a second machine where I log in as a different user and
attempt to open the database. So far, I've had no luck. The code
from MS's site always tells me that the database is not being opened
exclusively and I can always open the database from the second
machine. The shortcuts I've set up on both machines are set up like
this:

TARGET: \\pathToDatabaseFolder\database.mdb /excl
START IN: \\pathToDatabaseFolder

The path is the UNC path and the clients are running Access2K on a
Windows network.

Can anyone point out what I'm missing?

I'm not sure, but I think if you want to supply command-line switches
you have to include the path to the msacess.exe executable in your
target. Like this:

"C:\Program Files\Microsoft Office XP\Office10\MSACCESS.EXE"
"\\pathToDatabaseFolder\database.mdb" /excl

Be aware that it's not such good idea to open an Access database over
the network. It works, but it's corruption-prone. Better to use a
split front-end/back-end arrangement.
 
D

Dirk Goldgar

Dirk Goldgar said:
"C:\Program Files\Microsoft Office XP\Office10\MSACCESS.EXE"
"\\pathToDatabaseFolder\database.mdb" /excl

Note that your own path to the Access executable will be different.
 
T

Tony Toews

Dirk Goldgar said:
I'm not sure, but I think if you want to supply command-line switches
you have to include the path to the msacess.exe executable in your
target.

Dirk

This is correct.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top