The stop statement does not work, sorry I've tried by myself.@ JHB (again)
I've write an Stop statement as the very first statement, in order to break the cod at that point.
Again NOTHING. This tell me that the form events are not triggered.
The problem is the Dir which throws an error, (when the drive/folder isn't found), the program just stop, the database doesn't open the startup form, because of the way it is setup.@JHB
Well... huge apologies.
I see it working but still I don't understand why ?????
Can you perform one more test for me ?
Remove the error handler, rename the BE then try again.
Is this time working ????
Thank you very much !!!!!!!
What exactly do you not understand, maybe we can provide you clarity!Even if I don't fully understand what happen here, ..
Also, just trying to understand your process - if you are the developer, why have your clients got an accdb with access to the code which they are emailing to you, shouldn't they have an accde? and you have the master copy?
I haven't tried to do that for 3 FEs from one FE but my accde FE's can each relink their tables in a similar way to yours - (i.e. browse to the new db). Accde does not prevent users from messing around with tables or queries, only the code, so not sure why you can't make it work.If I make .accde files I'm not able to relink the FEs
... when in doubt create a new thread.Not sure if a new thread is required here, because I have a new issue:
You mean the dialogbox isn't shown the files with the .accde extensions?Not sure if a new thread is required here, because I have a new issue:
If I make .accde files I'm not able to relink the FEs (all 3 from a single one as I do with .accdb files).
Have you any solution ?
Thank you !
sFilter = "Access 2003 ([B][COLOR=Red]*.accdb[/COLOR][/B])" & Chr(0) & "[B][COLOR=Red]*.accdb[/COLOR][/B]" & Chr(0) & _
"Access 2007 ([B][COLOR=Red]*.mdb[/COLOR][/B])" & Chr(0) & "[B][COLOR=Red]*.mdb[/COLOR][/B]" & Chr(0)
Are you able to choose an .accde database in the dialogbox, or what is it exactly what not work?..
@JHB
I tested of course, to change the extension names (from accdb to accde) but does not work for accde.
More, no error message here but the BE is not changed.
IF this FE do NOT point to a BE THEN
the "z_CheckLinkToBackEnd" form is displayed
ELSE
the first form in logic tree is displayed
End IF
...
Dim FEfolder, FEname As String, FEpath As String
FEname = "\Definire[B][COLOR=Red].accdb[/COLOR][/B]"
FEfolder = CurrentProject.Path
FEpath = FEfolder & FEname
If IsDatabaseRunning(FEpath) Then
MsgBox ("""Definire"" este inca deschis" & Chr(13) & Chr(13) & _
"(re)conectarea nu este posibila")
Exit Function
End If
FEname = "\Citiri[B][COLOR=Red].accdb[/COLOR][/B]"
FEfolder = CurrentProject.Path
FEpath = FEfolder & FEname
If IsDatabaseRunning(FEpath) Then
MsgBox ("""Citiri"" este inca deschis" & Chr(13) & Chr(13) & _
"(re)conectarea nu este posibila")
Exit Function
End If
'(Re)link other(s) Front End database(s)
'First of my FE, named Definire.accdb
FEname = "\Definire[B][COLOR=Red].accdb[/COLOR][/B]"
FEfolder = CurrentProject.Path
FEpath = FEfolder & FEname
Set DB = OpenDatabase(Name:=FEpath)
GoSub RelinkThisFE
'Second of my FE, named Citiri.accdb
FEname = "\Citiri[B][COLOR=Red].accdb[/COLOR][/B]"
FEfolder = CurrentProject.Path
FEpath = FEfolder & FEname
Set DB = OpenDatabase(Name:=FEpath)
GoSub RelinkThisFE
'All is Ok
ReConnect = True