Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2005

Tip: Looking for answers? Try searching our database.

Opening multiple versions of form with different record sources

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stephen English - 19 Feb 2005 07:57 GMT
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
Allen Browne - 19 Feb 2005 09:32 GMT
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

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

>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
[quoted text clipped - 12 lines]
> Thanks
> Stephen
David C. Holley - 19 Feb 2005 13:18 GMT
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

> 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
[quoted text clipped - 10 lines]
> Thanks
> Stephen
Stephen English - 26 Feb 2005 00:25 GMT
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 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
[quoted text clipped - 20 lines]
> > Thanks
> > Stephen
Barry-Jon - 28 Feb 2005 23:37 GMT
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.
Barry-Jon - 19 Feb 2005 16:13 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.