Login error (1 Viewer)

Gismo

Registered User.
Local time
Today, 23:54
Joined
Jun 12, 2017
Messages
892
Hi All,

Please, i am in need of your assistance again
I have a very weird phenomena when users log in

1. When I sign in via the network or via the remote desktop, access works just fine
2. When other users open the DB via Remote desktop, the menu form which opens after login page, is not visible and the navigation pane is visible. (Menu must be visible and navigation pane and Ribbon must be hidden)

on the remote Desktop, we all use the same file which opens via a batch file

on my "OnCurrent" login form, i have the navigation pane and the ribbon and login form all hidden

not sure if I am missing something in my VBA but please could you advise if possible
Private Sub Form_Current()
Call DoCmd.NavigateTo("acNavigationCategoryObjectType")
Call DoCmd.RunCommand(acCmdWindowHide)
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.SetWarnings False
End Sub
Private Sub Form_Load()
DBEngine.SetOption dbMaxLocksPerFile, 1000000
DBEngine.SetOption dbMaxBufferSize, 500000

DoCmd.Maximize
frmWidth = Me.InsideWidth
frmHeight = Me.InsideHeight
DoCmd.Restore
DoCmd.MoveSize 0, 0, frmWidth, frmHeight
Call DoCmd.NavigateTo("acNavigationCategoryObjectType")
Call DoCmd.RunCommand(acCmdWindowHide)
DoCmd.ShowToolbar "Ribbon", acToolbarYes
DoCmd.SetWarnings (False)
End Sub
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 04:54
Joined
May 7, 2009
Messages
13,775
maybe put your first code in Public function and run it it Autoexec macro.
you have Same code on the Form_Load event, so discard that.
 

Gismo

Registered User.
Local time
Today, 23:54
Joined
Jun 12, 2017
Messages
892
maybe put your first code in Public function and run it it Autoexec macro.
you have Same code on the Form_Load event, so discard that.
never written any of my own public functions, not sure how to create it and i dont know who to run it Autoexec
please could you explain
 

CJ_London

Super Moderator
Staff member
Local time
Today, 21:54
Joined
Feb 19, 2013
Messages
13,247
on the remote Desktop, we all use the same file which opens via a batch file
unless the batch file creates a new FE unique to the user which is then opened by the user, this is a big no no. Users should not be opening the same FE file
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:54
Joined
Sep 12, 2006
Messages
14,529
depending what you do when the first user opens the database, subsequent users may see a different interface because of actions taken by either your code, or the first user.

Although Access is multi-user, it's safer not to have it as multi user, and the actual design implementation can make it not work correctly as multi-user.
 

Gismo

Registered User.
Local time
Today, 23:54
Joined
Jun 12, 2017
Messages
892
unless the batch file creates a new FE unique to the user which is then opened by the user, this is a big no no. Users should not be opening the same FE file
The batch file copies the file from the server to local file

@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
 

CJ_London

Super Moderator
Staff member
Local time
Today, 21:54
Joined
Feb 19, 2013
Messages
13,247
So does each user have their folder trusted? i..e. %USERPROFILE%\AppData\Local\Temp\Eng_DAW_Sheet\EngDAWSHEETTEMP

the issue you describe implies it is not, so the code is not running. They need to enable the code (a button they need to click)
 

Gismo

Registered User.
Local time
Today, 23:54
Joined
Jun 12, 2017
Messages
892
So does each user have their folder trusted? i..e. %USERPROFILE%\AppData\Local\Temp\Eng_DAW_Sheet\EngDAWSHEETTEMP

the issue you describe implies it is not, so the code is not running. They need to enable the code (a button they need to click)
each user has a new copy of the DB every time the open the batch file
non have their folders trusted so yes they need to click enable every time
i did not do this setting on each pc, not each remote desktop user
Hench, i am trying to het a coded to automatically trust the network location and i need to allow all macros in setting, but i dont know how to accomplish this.

i dont know how to test for a new revision of the DB, so the DB will be copied and placed on local drive every time

also, I dont know why it work on my pc but then the users opens the same version on remote desktop, the navigation pane is visible and the menu form does not show
 
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 21:54
Joined
Feb 19, 2013
Messages
13,247
There are a number of ways of handling revisions, the easiest can be accomplished by including a revision number in the file name - then compare names and only copy file if the name has changed or there is no file in the destination folder (i.e. a new user)

with regards setting a trusted location, there are plenty of examples out there. The issue is that to do it in vba requires the file to be trusted in the first place. google 'access vba set a trusted location' for plenty of examples. But at least if you only need to do it once.

There is one default trusted location - this varies depending on the version of office but for access 2010 for example it is

C:\Program Files (x86)\Microsoft Office\Office14\ACCWIZ\

look at your trusted locations to see what it is

So you could create a little db that just contains the code to alter the registry and have your script place it in the default directory and then run it. As to avoid running it repeatedly, check if the file is there in the first place. If it is, no need to run it again
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 21:54
Joined
Sep 12, 2006
Messages
14,529
@Gismo

can you just clarify. You said this at the top

1. When I sign in via the network or via the remote desktop, access works just fine
2. When other users open the DB via Remote desktop, the menu form which opens after login page, is not visible and the navigation pane is visible.

Do you all go to the same folder, and all use the same copy of the database, or do you all go to a different folder, and get a distinct copy of the database. We are all talking about front ends, I assume.
 

Gismo

Registered User.
Local time
Today, 23:54
Joined
Jun 12, 2017
Messages
892
@Gismo

can you just clarify. You said this at the top



Do you all go to the same folder, and all use the same copy of the database, or do you all go to a different folder, and get a distinct copy of the database. We are all talking about front ends, I assume.
everyone gets a copy from the same location
there is only one front end yes
 

Users who are viewing this thread

Top Bottom