Macro Conditions

R

RAO

I have an mdb that is used by several people at the same time. There is a
macro to delete and append a table then open a form. If one person has the
form open and another person opens it the first persons data disappears as
the table is being deleted. In my macro on the first line is a StopMacro
action with a condition of IsLoaded("frm1") then after the queries the last
line is Open frm2. can the (...) be used to still open form frm2 if another
person already has frm1 open?
 
S

Steve Schapel

Bob,

This is a *very* un-recommended way of doing things. Two people should
never be allowed to use the same form. You should set up your
application with a "split" database, with an mdb file containing the
core data tables on the server, and each user having a separate copy of
a "frontend" file on their own workstation, linked to the "backend" tables.

As for the "delete and append a table", it is difficult to comment
definitively without knowing more about what you are doing. It is very
unusual to be deleting a table unless it is a temporary table that holds
data short-term for the purposes of expediting a report or an export or
some such. If this is the case, such a table can also be in the
frontend database, so each user has their own copy.
 
S

Steve Schapel

Bob,

I don't know whether splitting the application will entirely solve the
problem, but I would say it is a good first step. It seems to me that
both users accessing the same data is not at the heart of the problem,
it is both users opening the same form at the same time. In a split
application scenario, each user has their own copy of each form, so
there is no opening the same form twice. Of course, this also means
that macro conditions that test for IsLoaded(Formname) will no longer be
necessary or applicable.
 
R

RAO

Steve,
Thank you again for your help! I researched split databases and as you are
right this is the correct way to be doing this with multiple users. I have
split my mdb and now it works fine.
 

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