Opening multiple versions of form with different record sources

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

Guest

I have a popup form which opens in modal mode to give users the ability to
enter some data in a temporary table. When the form opens it filters the
data for that users job. Several users could be accessing the form at the
same time. If the first user opens it and leaves it open and then a second
user opens it, enters some data and then closes it and then when the first
user closes it, the application crashes (Run time application).

I thought the solution would be to v=create a new instance of the form using
SEt myForm = New form_Data but when I do that the form closes at the end of
the initialisation routine.

I am sorry if this is a bit hard to understand but any ideas appreciated.
Thanks
Stephen
 
The best solution to your issue is to split the database, so that each user
has a local copy of the application (front end mdb file), with tables
attached to the shared back end mdb file. More info in:
Split your MDB file into data and application
at:
http://members.iinet.net.au/~allenbrowne/ser-01.html

However, the crash suggests that there is some corruption in this database,
and that is very likely given what you are doing. To fix it:

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect.
Explanation of why:
http://members.iinet.net.au/~allenbrowne/bug-03.html

2. Compact the database:
Tools | Database Utilities | Compact

3. Close Access. Make a backup copy. Decompile the database by entering
something like this at the command prompt while Access is not running. It is
all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Compact again.

That should solve the corruption. For further information on how to prevent
corruption see:
http://members.iinet.net.au/~allenbrowne/ser-25.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
Where is the *.mdb stored? Is it on a PC or on a server? If you're not
using a front-end/back-end configuration where the back-end contains all
related tables and the front-end contains the various forms, queries,
reports, & modules, I would strongly recommend moving into that
direction. Among other things, the problem your experiencing wouldn't be
happening because each person would have a copy of the front-end on
their own PC - unless of course multiple people are using the same PC.

David H
 
As the others have said you might want to try repairing the database
and splitting it so the users have the front end application (with
forms etc...) on their local machine but access the data on the
network. You can create multiple instances of the same form and you do
it, as you said, with an object variable (set myForm= new form_Data)
but the object variable needs to be scoped appropriately - globally or
at the module level within the form that is using the instanced form.
 
Hi David
I only work at this site on Sayrudays hence the tardiness if my reply!

The backend is stored on a server. The users are using the front end on
Terminal Server. Does this cause the problem do you think?

REgards
Stephen
 
Where are you calling the new instance of the form from?

Where are you scoping the variable (myForm) that points to the new form
instance?

I don't know anything about Terminal Server to be honest (I'm sure
others on here can help with that) but I would check out the scoping
issue first.
 
Back
Top