By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,455 Members | 2,161 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,455 IT Pros & Developers. It's quick & easy.

Select query password mask

fnwtech
P: 48
I have a database where all users need access to all tables, forms, etc. However, I am trying to make it so users can only see a subset of the data (teachers need to see data for their students). I created a select query which prompts for the teacher name and then password. Is there a way to mask the password as they type it?



Here is the query:
SELECT tblStudent.StudentStateID, tblStudent.StudentName, tblStudent.Status, tblStudent.Grade
FROM tblTeachers LEFT JOIN tblStudent ON tblTeachers.TeacherID = tblStudent.TeacherID
WHERE (((tblStudent.Status)=Yes) AND ((tblStudent.Teacher) Like "*" & [Type teacher last name] & "*") AND ((tblTeachers.password) Like [Please enter your password]))
ORDER BY tblStudent.StudentName;

thanks!
Oct 16 '07 #1
Share this Question
Share on Google+
7 Replies


Rabbit
Expert Mod 10K+
P: 12,315
No, but how about using an intermediary form that opens the query? You can mask passwords on the form.
Oct 16 '07 #2

fnwtech
P: 48
So I create a form that uses the teacher name and password, how do I pass this on to the query... by using a control that launches the query?
Oct 17 '07 #3

Rabbit
Expert Mod 10K+
P: 12,315
Yes, and you can refer to controls on forms using Forms!FormName!ControlName
Oct 17 '07 #4

fnwtech
P: 48
okay, I am definitely doing something wrong. My query has prompts for teacher name and password. Should I remove these prompts? If I don't, when I launch the form the prompts come up.

But when I remove the prompts, it returns all records, not just the ones for this teacher.

So let me start at the beginning... I created the form in design view using the select query. I pulled in the teacher name and password from the query field list. Is this correct?

Thanks so much for your help - this is driving me crazy!
Oct 17 '07 #5

fnwtech
P: 48
I got it - using your query by form works better than what I was trying to do!

Thanks so much... Now I can sleep tonight!
Oct 17 '07 #6

Rabbit
Expert Mod 10K+
P: 12,315
I got it - using your query by form works better than what I was trying to do!

Thanks so much... Now I can sleep tonight!
Not a problem, good luck.
Oct 17 '07 #7

fnwtech
P: 48
Using the query by form worked great for masking the password, however it doesn't limit someone to just that subset of data. Is there a way I can make this subset all they have access to?

This database is used by multiple schools. I want to have them use this query to log in and then only have access to the students that this query returns. I tried query to table, however that locks all other users out. I have record locking set to "Edited Record" and Open database using record level locking - because several teachers need to assign grades to the same students - though no two teachers should ever be trying to access the exact same field for a student. Should I not have these set?
Oct 25 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.