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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FE

Status
Not open for further replies.

vandaliarental

Technical User
Jul 17, 2000
84
US
We have a Windows 2003 server.

Currently, we've only had 1 front end on the server with no security set up. There are shortcuts for each user to run whichever dbs they need.

After reading several messages, I am in the process of setting up security & distributing the FE to each user.

Just a couple of questions:

1) Where to put the FE? Each user has a directory on the server for their documents. Can I put it there or should I actually place it on their pc? (The pc's are not backed up; only the files on the server).

2) I have some that run as scheduled tasks on the server. Can I run the main FE copy on the server or do I need to create another copy for the server to run?

3) Can I have different switchboards for each user? Do I need to create a different FE for each so that the correct switchboard would open?

Thanks for your input!

Connie
Vandalia Rental
 
Definitely have the users run a COPY of the FE on their computers. Your network admin and the users will thank you. This prevents the objects from being read over the network (makes it faster). Obviously you want the data central on the network so you are stuck with keeping it on the network.

The great thing about users having copies is you can work on a copy and not disturb the production environment. The trick is rolling out updates... One of the Access forums has a FAQ about it. It shouldn't be that difficult to find.

Hmmm... different switchboard for each user. If I recall correctly, switchboards are table based (easily substituted with a query driven by user). Most definitely more complicated than I cared to deal with (I prefer the static screens with custom buttons better). If that much is right... Do you use access security for each user? If so, you could use currentuser() and queries to manipulate the swichboard. Besides Currentuser, you can make an API call to get the network username, see below. I'm sorry I don't know more about switchboards but hopefully this will get you started.

Declare Function WNetGetUser& Lib "Mpr" Alias "WNetGetUserA" (lpName As Any, ByVal lpUserName$, lpnLength&)
Function NetworkUser() As String
'Hacked up code from ACC: How to Retrieve Workgroup Information Under Win32
'PSS ID Number: Q148835
'needs declaration: Declare Function WNetGetUser& Lib "Mpr" Alias "WNetGetUserA" (lpName As Any, ByVal lpUserName$, lpnLength&)
Dim cbusername As Long, UserName As String
Dim ret As Long
UserName = ""

' Windows 95 or NT - call WNetGetUser to get the name of the user.
UserName = Space(256)
cbusername = Len(UserName)
ret = WNetGetUser(ByVal 0&, UserName, cbusername)
If ret = 0 Then
' Success - strip off the null.
UserName = Left(UserName, InStr(UserName, Chr(0)) - 1)
Else
UserName = ""
End If
NetworkUser = UserName
End Function
 
I second everything lameid has suggested but would add one thing:

Whilst users running a copy of the frontend on their local drives is definitely beneficial it is important to ensure that, after you have made updates to the database frontend, the users are running the correct FE version.

The way I achieve this is to put a table in the frontend storing FE version number/date/description details and a corresponding table in the backend (and then linked into the frontend). During the system's startup routine you can run a check between the two tables to ensure the version numbers match and boot the user if they have an out-of-date frontend MDB file.

Ed Metcalfe.

Please do not feed the trolls.....
 
...instead of booting the user, you can use a batch file to do the checking on a new FE. The batchfile will start the DB, but before, it will if nescesary copy a new FE, so the user will not notice it (beside a small delay due to the copying).

Also, if you do a usergroup-check on your startupform, you could jump to any form you like.


EasyIT

 
Thanks for all the input!!

I have my scheduled tasks running each night on the server. The main FE/BE is on the server. Should I make a secondary copy of the FE for the scheduled task to run, or use the original?

Thanks,
Connie
 
I guess it depends on how you do your code updates. If you only overwrite the 'original' by copying your development copy over it, then I say copying the original is the easiest. This is basically how I do it although I run a procedure that fires on opening the database which executes a batch file if an update is needed. This has the advantage of being able to roll out updates in the middle of the day. Unforturnately I find bugs in production and have to fix them. I wouldn't want to have to say, 'wait till tomorrow to fix it'. On the otherhand you could just send out a shortcut or hyperlink to a batch file that copies the FE for these special circumstances (but are users really reliable enough to do what they are told, and if so are you hiring?).
 
Lameid:

I don't think I explained my scheduled tasks well enough.

I'm not using them to roll out updates, I'm running queries & reports from a scheduled task, therefore changing temp tables in the front end.

From reading the rest of the threads, it sounds like I ought to have 1 back end, 1 master front end, a front end on each user machine, a front end for my scheduled tasks and a development front end. Does that sound correct?

Thanks,
Connie
 
Oops... I forgot to reread the whole thread. That sounds right. The key point for the 'master' FE is that it can't be locked (in use). If it was, users could not copy it. And obviously, you don't want to develop in production.
 
Lameid:

I'm curious about your switchboards. I have a couple of standard switchboards set up with the code to display the correct one based on the network user ID, but you say you use static screeens? How would you handle this problem that way? Build a different form in the fe for each user, then use the network ID to load the proper form?

Although I use the switchboards, I don't really like them. Too many limitations!

Connie
 
When I say static screens, I mean I put buttons on forms that are the same for all users. I'm just guessing from what I remember from looking at a swichboard (once several years ago) that you could customize it by user.

I have however made a reports screen with a drop down for reports instead of buttons. I just have one field as the display text and another as the report name. If you added a user, you could filter by user. The code on the button just uses docmd.openreport to open the appropriate report (actually I conditionally make visible filter fields and build filters in code and pass that too) It is a bit obnoxious to setup the filters but it is very easy to maintain and add reports that use the same kinds of filters.
 
Yes, you can customize a switchboard by user. I built a table of network users & what default switchboard they should have. Then, using code I found here, identify the network user & load the appropriate switchboard.

But I just wondered if it could be friendlier making a form for each user & just picking which form to load based on their network login.

Thinking it through, either I have a table with a list of users and use the switchboard manager with a list of switchboards, or just have a list of forms. I'll probably stay with the switchboard, but keep the forms in the back of my mind!

Thanks for all your input!!

Connie
 
One more thought... You might want a form for a group. You could then say this group gets this switchboard or form. Depending on your situation that may be easier to maintain.

Also what you are talking about with a switchboards and I am talking about are different. Maybe I don't remember how switchboards work but I thought what they display is based entirely off of a Recordsource (table) and therefore you could make changes to it to use a query. Then you could have a query determining what is displayed. Maybe I really completely misremember it.
 
You remember correctly. Switchboards are based on a table. I've created an additional table showing which user has what default switchboard. Then the code that runs when they open the database finds the network user ID, looks up what default switchboard they ought to have in the table I created, then modifies the switchboard table to make that switchboard the default.

Connie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top