Login for Data Access Page

dazstarr

Registered User.
Local time
Today, 12:46
Joined
Mar 19, 2007
Messages
132
Hello

Can anyone help?

Im in the process of making an access database with a login form. I used VB code to validate the login which was bound to a logon button after the user puts in a username and password.

This worked fine - but I now need to do the same for a data access page.

Can anyone tell me how to do this please?

Many Thanks
Daz
 
make a switchboard taht only allows the user to see the data form after they log in that way its done with only one login form!
 
DAP Login

Im quite new to access and have never used data access pages so pls bear with me.

By switchboard - does this mean use an access form to login - which then points to the data access page?

Thanks
 
you could do it that way!
in the onclick of the login button have it open the page if the password is correct

a switchboard is a place where a user would have access to all the forms that the admin wants them to have access too. instead of going into the database window and clicking each form. a user can click a button and the form opens.
 
DAP Login

Ideally - what I (or management!) want is 1 link to a webpage where a user inputs a username and password which then takes them to a another webpage. Can this be done?

I managed to crack it using a access form, but no idea how to do it on a data access page. I tried exporting the form to a d.a.p, but it just ignored the code.

Sorry to sound noobish!

Thanks in advance.
 
It's easier to check if the domainuser has access than creating a full login form with DAP.
The code below checks if the domainuser has access to your db. You define in a table which domainusers that should have access to the DAP. With this approach you dont need a password function, but obviously you could add that as an addition with a tiny javascript.

Do the following. Finish your DAP, dont worry about the security issues yet.
Create a table in access, call it tblUser, UserID is the primarykey and the db users should have the same username as the domainusername.

Then, create a file in the same folder as your page/indexfile. Call it Access.htm and add the code:

Code:
<%
login= replace(ucase(request.servervariables("AUTH_USER")),"YOURDOMAIN\","")
set conn=Server.CreateObject("ADODB.Connection")
conn.open("Driver={Microsoft Access Driver (*.mdb)};Dbq=\\yourserver\yourbase.mdb;Uid=Admin;Pwd=;")

set rs = conn.execute("SELECT userID FROM TblUser WHERE userID ='" & login  & "'")
if rs.eof then
 response.redirect ("http://NO-ACCESS.htm")
end if
 
%>

Open your dataaccesspage in a html-editor (f.ex frontpage), add the following right after the Head of all your pages you want to protect.

Code:
<!--#INCLUDE FILE="access.htm"-->

You can now include the same security for all your pages by adding the line above to the page.
Only usernames defined in your table get access.

Create a page called no-access.htm in the same folder. Add the text, Access denied!
Users without access to your db, get routed to this page.

I only use the domaincheck, no need for passwords.
You can also add a simple password function, but the main security is done by checking domain user.
 
Last edited:
Hi All,
Can you please help me to create the login page through "Data Access Page". I have already build the tables & other details for my dashboard.
I have to build only the login page using html / data access page. I have 70 users & 70 passwords (Access - table) are stored in the table but i am not sure how to check those users & password in HTML / Data access page.
Request you to please assist me.
 

Users who are viewing this thread

Back
Top Bottom