Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

very rookie question -sharing ms access

Status
Not open for further replies.

77zxmax

MIS
Dec 28, 2004
45
CA
I've just developed a simple program , and would like to share it over a lan - i shared the folder where the database are in it, when i open it over the lan, i get a message " can't lock file"
i've have "shared" selected under tools>> options>> advanced

in that database, i have some tables, forms, and reports,>> can that be done (sharing it over lan ? )

if anyone has a good step by step documention, it will be great

thanks
 
This is called splitting a DB. The "frontend" consists of the "skeleton" of the DB i.e. the structure for all the forms, reports, controls, etc. A copy of this goes on each computer you want to be able to access the DB. The "backend" consists of the actual data. This goes on one computer that is accessable thru the network.

If you click on Access Help and enter the word "splitter" you will see an entry that says something like "How to split a data base..."

A second method is offered by a member of this forum in the Facs section at:

Hope this helps!

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
Yes, most everyone does it that way. Check to make sure the user can access the shared location (i.e. via Windows Explorer).

Usually, we have Front-End (FE) db and a Back-End (BE) db. The FE db contains everything but the tables. The BE db just contains the tables. The FE db links to the tables in the BE db. Then you distribute the FE db to your users. If everyone is running the FE from the server you could run into the problem when one of the user's corrupts your database and, consequently, none of the users can get into the database. That's why, as a general rule, each user has a copy of the FE on their machine.

With the FE residing on individual machines, you have the problem of how you plan to distribute new versions of the FE to each of the users. This is how I do it. I created a table the contains, at a minimum, the following fields:
strComputerName
strDBName
strUserName
strOfficePhoneNumber
strOfficeLocation
ysnNewVersion
ysnBroadcastMsg
ysnQuit

The command environ("computername") will return the name of the computer. The command CurrentUser will return the name of the current user (if you have security activated, else environ("username") will return the user's NT name.) The primary keys for the table are strDBName and strComputerName. When the db is opened, the first thing I do is call a startup function that determines the name of the computer and the name of the current db. It then trys to find a match within the table. If no match is found, it then pops up a form that asks the user to fill in his/her phone number and office location (computername, username, and databasename are auto populated). Note that if, for whatever reason, you need to contact a user, you have their phone number and office location stored in your database. If a match is found, it checks the ysnNewVersion flag. If it is set, then I launch a batch job and exit the db. The batch job copies the new version of the FE db to the user's machine, clears the ysnNewVersion flag, and opens the FE db.

Note that there were a couple of other flags (ysnBroadcastMsg and ysnQuit). I have a form that is launched at startup the runs invisible. The OnTimer event is set to whatever. When the timer event is kicked off, it checks to see if the ysnBroadcastMsg flag is set. If set, I popup a form the displays whatever message I want the user to see (i.e. "System going down in 5 minutes...Please exit the database"). If the ysnQuit flag is set, then the I issue the Application.Quit command that forces the user out of the database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top