How to get Visual Basic to work with Security Wizard setup in MS Access?

How to get Visual Basic to work with Security Wizard setup in MS Access?

Post by Bruce Murph » Sat, 02 Nov 1996 04:00:00

I downloaded the Security Wizard and followed the directions in the white
paper from Microsoft.  All went well.  I was able to secure my database.  I
then tried to get to it from VB4 using DAO code.  I kept getting an error
saying that I could not read it.  The white paper speaks of using the
"workspace" property.  I used the following code:

 'Setup call to the database and validate login and password
 Dim MyWorkspace As Workspace, MyDb As Database, MyRs As Recordset
 Dim MyLogin As Field, MyPassword As Field, MySecretary As Field, MyType As
 Dim i As Integer, Login As String, Password As String
 Set MyDb = OpenDatabase("C:\MYDB.MDB")
 Set MyRs = MyDb.OpenRecordset("Login", dbOpenDynaset)   '******BLOWS UP ON
 Set MyLogin = MyRs.Fields("Login")
 Set MyPassword = MyRs.Fields("Password")
 Set MySecretary = MyRs.Fields("Secretary")
 Set MyType = MyRs.Fields("Role")
 lblMsg.Caption = "Please wait, validating login..."

 'Validation Routine


When it stops execution, I get the message "You do not have read
permissions on this database".  

Q1) How do I pass the login and password for the database which is separate
from the login that I am using for each       person?  This is an MS Access
2 database.

Set MyWorkspace =

Q2) I want to use the Data Control to do the rest of the screens.  This
also blows up and I am not sure how I set the
      password and login for a data control.  Once I am logged in, will the
connection remain open until I close the
      database and will this allow the data control to work?

Thanks for any help!



******** VISIT US AT ***********
Company    : Hall Kinion/RTP
Website    :
Location   : WILMINGTON, NC
Job Type   : Full-Time Salaried
HALL KINION/ Technical Recruiter-NEVER A FEE!

Hall Kinion is the largest full-service tech recruiting firm in the Silcon
Valleys of the world. We work with top technical companies to offer the best of
permanent and contract placements in North Carolina and across the United
States and the U.K.

2-5 years Visual Basic and RDBMS (Oracle, Sybase, Access or SQL Server).

Plusses: web technology experience, Java, Visual C++.

Multiple positions in Raleigh, NC or Wilmington, NC. Pay is excellent; good
learning opportunities too! Permanent, full-time opportunity!

Travel Required          :None
Educational Requirements :None
Required Skills
* Visual Basic
* MS SQL Server
Definite Pluses
* Java
* Visual C++
* Web Browser Technology
Why use me to find you the best job possible? IT SPECIALIST THAT WORKS WITH
OVER 1500 Companies Nationwide, (150 Locally) = THE BEST JOBS
Contact Information:
Reference : SJ113234
Debbie Bush

Phone: 800-365-3031
Fax No: 919-572-6550
***********************  ****************************

                The On-Line, On-Target Job Finder for Computer Professionals  

** Post Your Resume and see results immediately!! ** Always free **
** Post jobs for 30 days for $100, up to 250 postings $350/month
** Matching Resumes E-mailed daily
**  Your ads are virtually guaranteed to be seen by jobseekers on the NET **

                    ** Automatic Posting to **
   ** Yahoo            ** Americas Job Bank    ** Career City    *** ClassifiedsWarehouse
   ** HeadHunter.Net   ** Classifieds 2000     ** Usenet Newsgroups
               *** OVER 40 MILLION HITS/MONTH COMBINED !!! ***

***********************  ****************************

2. secondary index from delphi

3. GA-Atlanta-98153--Visual Basic-MS ACCESS-RDBMS-ORACLE-Programmer-Visual Basic and Access

4. Problems connecting

5. dBase IV Help problem

6. TX-HOUSTON-105339--Visual Basic-MS ACCESS-ORACLE-Web Development-Visual Basic Programmer/Analyst

7. Detroit - Oracle Developer Full Time Position- $80K

8. IL-Chicago-47740--Programming Skills-Visual Basic-ORACLE-DBMS-MS ACCESS-Programmer-Visual Basic + Oracle