Strange behaviour (1 Viewer)

Gismo

Registered User.
Local time
Today, 18:12
Joined
Jun 12, 2017
Messages
1,298
Hi All,

Me again :)

My DB is behaving very strange

Let be explain our setup

I sit in the office with a wired network. The file in use is on a network drive
When I use the DB, it works perfectly

The engineers in the hanger utilize a wifi connection and also they sign on to the remote desktop
The engineers opens the DB using a batch file.
The same file I use, I copy into a separate folder on the network which is the opened by the batch file.

Now the strange behavior is, when the Login page opens, it hides the navigation pane (works fine when I use it)
When the engineers opens the DB, on sign on button after entering credentials, the navigation pane appears and does not sign on
They have to click on the sign on button again to actually sigh in
Still the navigation pane is visible.

Below is my code when login forms opens and the actual login button code

Private Sub Form_Current()
Application.AutomationSecurity = msoAutomationSecurityForceDisable
DoCmd.NavigateTo ("acNavigationCategoryObjectType")
DoCmd.RunCommand (acCmdWindowHide)
DoCmd.ShowToolbar "Ribbon", acToolbarNo
End Sub

Private Sub btnLogin_Click()
Dim cboUserName As String
Dim txtPassword As String
Dim rs As Recordset

DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.SetWarnings False

strCBOPass = Me.cboUserName.Column(1)
strPassword = Me.txtPassword

If strCBOPass = strPassword Then
DoCmd.OpenQuery "Update Registration Select to No"
DoCmd.OpenQuery "Clear_Registration_File"
DoCmd.OpenQuery "Update_Registration_All"
DoCmd.RunMacro "Update Aircraft SerialNo-Reg"
DoCmd.RunMacro "Update DAW Sheet TBL"
DoCmd.RunMacro "Startup"
DoCmd.OpenForm "Menu"
DoCmd.OpenForm "ChangePassword"


Else
MsgBox "Login Unsuccessful"
Exit Sub
End If

DoCmd.OpenQuery "Update DAW Data with Workpack no - Signon"
DoCmd.OpenQuery "Update User Log - Log In"
DoCmd.SelectObject acModule, "OpenOutlook", True
'Call DoCmd.NavigateTo("acNavigationCategoryObjectType")
'Call DoCmd.RunCommand(acCmdWindowHide)
DoCmd.SetWarnings True

End Sub

Not sure if I am missing something, but on my side it works fine
Engineers gets the errors

Oh, below is my batch file code if needed
You assistance is highly appreciated

@ECHO OFF
md %USERPROFILE%\AppData\Local\Temp\Eng_DAW_Sheet\EngDAWSHEETTEMP
del %USERPROFILE%\AppData\Local\Temp\Eng_DAW_Sheet\EngDAWSHEETTEMP\DawSheet.accdb
copy "\\sjo2054\CAMO\DAW Sheet\Engineers\Daw Sheet.accdb" %USERPROFILE%\AppData\Local\Temp\Eng_DAW_Sheet\EngDAWSHEETTEMP\DawSheet.accdb
start %USERPROFILE%\AppData\Local\Temp\Eng_DAW_Sheet\EngDAWSHEETTEMP\DawSheet.accdb
 

bob fitz

AWF VIP
Local time
Today, 16:12
Joined
May 23, 2011
Messages
4,717
Is the database split, with one backend file, and each user having a copy of the frontend on their own machine.
 

Gismo

Registered User.
Local time
Today, 18:12
Joined
Jun 12, 2017
Messages
1,298
Is the database split, with one backend file, and each user having a copy of the frontend on their own machine.
Yes, each has their own front end copy, that is what the batch file does
It makes a copy of the files saved on the server then the user works on his remote desktop on the copied file
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:12
Joined
Oct 29, 2018
Messages
21,358
Did it use to work before for the engineers and just recently stopped working?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 11:12
Joined
Feb 28, 2001
Messages
26,999
Check the permissions of the engineers. Typically, things go wonky at login time if there is something wrong with permissions. Each user must have MODIFY permission on the backend file AND on the folder where it is located. They also need PASSTHRU for all folders in the path between the physical drive root and the folder where the backend is kept. If each user's copy of the DB is a private directory that they own, then that should be no issue since ownership trumps permissions.
 

bastanu

AWF VIP
Local time
Today, 09:12
Joined
Apr 13, 2010
Messages
1,401
You should also make sure that each of those individual paths ( %USERPROFILE%\AppData\Local\Temp\Eng_DAW_Sheet\EngDAWSHEETTEMP) are set to be Trusted Locations which I think might be the root cause of your issue.

Cheers,
 

Gismo

Registered User.
Local time
Today, 18:12
Joined
Jun 12, 2017
Messages
1,298
Did it use to work before for the engineers and just recently stopped working?
Wel, for some users it was working perfectly
Other users have difficulty in opening the DB

But everyone uses the same copy of the DB
 

Gismo

Registered User.
Local time
Today, 18:12
Joined
Jun 12, 2017
Messages
1,298
Check the permissions of the engineers. Typically, things go wonky at login time if there is something wrong with permissions. Each user must have MODIFY permission on the backend file AND on the folder where it is located. They also need PASSTHRU for all folders in the path between the physical drive root and the folder where the backend is kept. If each user's copy of the DB is a private directory that they own, then that should be no issue since ownership trumps permissions.
The problem comes in even before they sign on to the DB, the problem is when the DB is opened

The Permissions of all the users on the network have been checked and seem to be fine
 

Gismo

Registered User.
Local time
Today, 18:12
Joined
Jun 12, 2017
Messages
1,298
You should also make sure that each of those individual paths ( %USERPROFILE%\AppData\Local\Temp\Eng_DAW_Sheet\EngDAWSHEETTEMP) are set to be Trusted Locations which I think might be the root cause of your issue.
I believe you might be correct, now that you mention it.
I have been trying to have this trashed via VBA at startup for ages now but not sure how to code.

I need to have the user profile as a wildcard so not sure as the path requires C:\...
Also, shouldn't the path be trusted even before the DB is opened? to avoid getting the allow content button
 
Last edited:

bastanu

AWF VIP
Local time
Today, 09:12
Joined
Apr 13, 2010
Messages
1,401
The trusted locations should be set once for each user (by the user currently logged on if the location is part of the user profile), you don't do it every time you open the database. Just send them all an email with instructions and screen shots on how to do it.

To do it in code is no trivial matter and involves editing the registry that can cause major issues if you are not 1000 % (notice the extra zero) sure what you are doing: https://www.tek-tips.com/viewthread.cfm?qid=1718392

And yes, the whole idea is to have the it in place before you open the file so the VBA code can run.

Cheers,
Vlad
 

Gismo

Registered User.
Local time
Today, 18:12
Joined
Jun 12, 2017
Messages
1,298
The trusted locations should be set once for each user (by the user currently logged on if the location is part of the user profile), you don't do it every time you open the database. Just send them all an email with instructions and screen shots on how to do it.

To do it in code is no trivial matter and involves editing the registry that can cause major issues if you are not 1000 % (notice the extra zero) sure what you are doing: https://www.tek-tips.com/viewthread.cfm?qid=1718392

And yes, the whole idea is to have the it in place before you open the file so the VBA code can run.

Cheers,
Vlad
Unfortunately my Batch file does not check for new versions, when they click on it, it copies a new copy to the local drive.
Does that mean that all trusted locations needs to be "re-trusted" again? which is the case

Also, my concern is, if the navigation bar is hidden on opening of the sign on page, why would it be visible when the main menu opens?
And this only happens on the users opening the BD on the remote desktops
I don't ever get that instance.
 

bastanu

AWF VIP
Local time
Today, 09:12
Joined
Apr 13, 2010
Messages
1,401
The trusted location is not tied to an "instance" of the front-end\Access file but to a MS Office installation setup, so once set it should stay on.
 

Users who are viewing this thread

Top Bottom