Macro Conditions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
Steve,
thanks for your quick reply. I use the delete and append because I am
pulling data from tables through ODBC links and the data changes frequently.
I use the temporary table only to capture a certain amount of information
which I then archive. I have not worked with split mdb's. Just by splitting
the database will this solve the problem? Or do i still have to do some thing
else?
 
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.
 
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.
 
Back
Top