piyushdabomb
IS-IT--Management
Hi Gurus,
Currently, I have several PROCEDURES where I am able to successfully open a databse using the OpenDatabase method. The problem is that I have to constantly supply a password. Is there a way where I can bypass this?
The current syntax:
Set Open_DB2 = Workbooks.OpenDatabase(filename:="C:\" & numstuds_total)
I tried using the following syntax:
Set G_Workspace = DBEngine.Workspaces(0)
Set G_Database = G_Workspace.OpenDatabase("C:\" & numstuds_total, False, False, "MS Access;PWD=" & G_password)
but I keep getting an "Object Required" error.
Any help is greatly appreciated.
I looked into a similar thread but using the subscribers syntax, I am not able to get it to work successfully.
Currently, I have several PROCEDURES where I am able to successfully open a databse using the OpenDatabase method. The problem is that I have to constantly supply a password. Is there a way where I can bypass this?
The current syntax:
Set Open_DB2 = Workbooks.OpenDatabase(filename:="C:\" & numstuds_total)
I tried using the following syntax:
Set G_Workspace = DBEngine.Workspaces(0)
Set G_Database = G_Workspace.OpenDatabase("C:\" & numstuds_total, False, False, "MS Access;PWD=" & G_password)
but I keep getting an "Object Required" error.
Any help is greatly appreciated.
I looked into a similar thread but using the subscribers syntax, I am not able to get it to work successfully.