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

Keeping track of Front ends.

Status
Not open for further replies.

Peps

Programmer
Feb 11, 2001
140
ES
Is it possible to keep track of my front ends?. Let's refrase that: I have various front ends which are all linked to the same backend. If this backend is moved, the active front end relinks to the database (thanks Gord)... I have created a menu called "Admin" and an MDB called "General". Can "Admin" tell me where "General" is in case someone moves it to another directory. That way I call always open "General" no matter where she has been moved to.

Thanks for your time.
Peps
 
First off peps, that subject line paints a picture... good thing you did the rephrase!

If I get this right you want to monitor the movement of your various front ends from another front end so to speak? How about a link from one front to the other(s) or one front to the back and then the back to the other front(s)? Either way you cut it, I don't see how you can monitor the movement as it happens, only react when it is not where it's supposed to be. You could read a little on using the common dialog control and see how, if a link is broken~unavailable, to call up the Windows common dialog, poke around until you find the file in question, take the result and run your relink based on it. Am I on track here? :cool: Gord
ghubbell@total.net
 
Hi Gord, I knew this would be a difficult one to work out! Maybe there is an easier way. I have a folder which is called "Progs", she contains various subfolders, one of which is called "Cont", she contains a front end or mdb called "Control". I'm able to return value or full path of "control" by using the following Module:

Function ap_LastInStr(strSearched As String, strSought As String) As Integer
Dim intCurrVal As Integer, intLastPosition As Integer

intCurrVal = InStr(strSearched, strSought)

Do Until intCurrVal = 0
intLastPosition = intCurrVal
intCurrVal = InStr(intLastPosition + 1, strSearched, strSought)
Loop

ap_LastInStr = intLastPosition

End Function

On a from I am able to return the full path to "Text84" by applying the following a button:

Dim dbs As Database
Dim ruta As String
Dim REtVal As String
On Error GoTo Err_Comd

Set dbs = CurrentDb()
'obtener ruta front end
ruta = Left$(dbs.NAME, ap_LastInStr(dbs.NAME, "\"))

Me.Text84 = ruta

Err_Exit:
Exit Sub
Err_Comd:
MsgBox Err.Description
GoTo Err_Exit


Gord, this goes a little too far as it goes right up to the name of the subfolder. If a can get the path only as far as
: "C:\Program files\Progs\" instead of "C:\Program files\Progs\Cont\". This way I can control all the front ends inside "Progs". I hope you can understand what I'm trying to explain.

Cheers
Peps

 
Peps & Gord.

Two quick thoughts.

Peps, If you have the whole path, use SPLIT (ver 2K) or basSplit (somewhere in Tek-Tips Ms. Access for ver '97). Use "\" for the second arg and get te path broken down to each level.

Secondly, you can use the code in "Cont" by setting a reference to it in the other front ends. Further, you COULD set up "Cont" to include a simple table which contains the THEN CURRENT path to the 'back-end', In the front end(s), set up a process which checks for a specific table in the back end. On failure, check the table in Cont for the current location, and reset the path to this.

Thrid, WHY does the back end 'Move'? This - to me - is rare (and VERY RUDE!). Doesn't anyone have any Dicipline? Control? Courtsey? Get the SysAdmin to STOP these random acts of address change! Do it NOW, before something serious happens!

Fourth, Why are you using links? You can do a lot more with instantiating the various tables via DAO or ADO using URL addressing. This would also be able to take advantage of maintaining the path of the back end in your Cont db and referencing this when the table(s) in the back end are not found.



MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Peps, Michael is bang on here about the movement in his third point:

Cure the problem, not the symptom! :) Gord
ghubbell@total.net
 
Michael & Gord,

Although you’re both right, there always exists the type of person who loves playing around... I'm sure you both know someone who fits the description! I think I'll do what Michael said in his second point. Thanks guys.

Peps
 
" ... there always exists the type of person who loves playing around... "

In MY world, this WILL generate a [red]VERT BRIEF[/red] exit interview.

Which I believe appropiate. Fun and games in the work place are GOOD - up to the point of disrupting the real work. Moving multiuser files on a network falls in this category.

Unless the person "playing" this game is the OWNER - go straight to the BOSS and give him/her/it a copy of this. Name Names. Validate Dates and times of occurance. Get the Net Admin in the room. He needs to be involved. As part of the soloution - or part of the problem. This *&^%*&^%*&^%@#^%*#^@%&* is costing your company in lots of ways.


Sorry for the Shouting from the rooftop, but such behaviour is simply un-acceptable!


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Yep, I totally agree- Only thing is that this application is not for my company. Although there are people who do things like this you also get the type who moves a file and later say's "I did'nt know" and then says " It's not my fault" - Being fair, the company I'm writing for may want to change from W98 to W2000 or Me. All I want to do is ensure that my application keeps running even though one of the above happens. The back end situation works fine, with regards to the front end "I'm getting round it".

Thanks
Peps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top