How to Open a Secure Database from Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Want to open an instance of Access from code and run a report. Database is secured and I can't figure out how to pass User and Password info

dim objAccess as Objec
set objAccess = CreateObject("Access.Application"

fails because Object is secure want to login as a certain user / password
 
Hi,

See: HOWTO: Open an Access Database with User Security
http://support.microsoft.com/default.aspx?scid=kb;en-us;163002

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights

--------------------
| Thread-Topic: How to Open a Secure Database from Code
| thread-index: AcQIWerqNJ+eWnqTS9yFKrzvd6p0Lw==
| X-Tomcat-NG: microsoft.public.access.security
| From: "=?Utf-8?B?RWQgRG9saWtpYW4=?=" <[email protected]>
| Subject: How to Open a Secure Database from Code
| Date: Fri, 12 Mar 2004 09:46:15 -0800
| Lines: 7
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.security
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.security:9096
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.access.security
|
| Want to open an instance of Access from code and run a report. Database
is secured and I can't figure out how to pass User and Password info.

dim objAccess as Object
set objAccess = CreateObject("Access.Application")

fails because Object is secure want to login as a certain user / password.

|
 
Thank you so much for your prompt reply. I followed the instructions and was able to successfully login and access the data.

What I am missing is how to set a variable / reference the application object. For example, I'd like to Open / Run a report after opening the database. How do I get from the database object to the application object or execute a DoCmd type command.

I'm so close I can smell success
 
Hi,

Here's the article that should help:
HOWTO: Automate a Secured Access Database Using Visual Basic
http://support.microsoft.com/?id=192919

In the article you could code similar to the following:
accObj.DoCmd.OpenReport "name of Report", acViewPreview


Regards,

Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights

--------------------
| Thread-Topic: How to Open a Secure Database from Code
| thread-index: AcQKlfZVBmXFOx81Sm+wVemTV1O6tA==
| X-Tomcat-NG: microsoft.public.access.security
| From: "=?Utf-8?B?RWQgRG9saWtpYW4=?=" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: RE: How to Open a Secure Database from Code
| Date: Mon, 15 Mar 2004 06:01:07 -0800
| Lines: 6
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.security
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.security:9138
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.access.security
|
| Thank you so much for your prompt reply. I followed the instructions and
was able to successfully login and access the data.

What I am missing is how to set a variable / reference the application
object. For example, I'd like to Open / Run a report after opening the
database. How do I get from the database object to the application object
or execute a DoCmd type command.

I'm so close I can smell success!

|
 
Back
Top