Form -- Login and Password

T

Tom

I need some help with designing a form that uses a "password" (textbox) and
brings up a subform when the entered password is correct.

More specifically, here's what I have in mind...

Main Form:
1. There will be 2 cascading combo boxes (e.g. if "TX" then "Austion or El
Paso", if "CA" then "Los Angeles or San Francisco", etc.) on the mainform .
2. There also should be some textbox that uses a "masked entry" for a
password (using asterisks)

Sub Form:
1. Depending on the 2 values (e.g. "CA" & "Los Angeles") chosen on the
mainform & if entered password is correct, the subform should be populated
with data (datasheet view) that is part of the "CA" & "Los Angeles"
combination.

More info...
Let me explain the process further (not using the geography sample).

Essentially, I want to create a survey that will allow employees to log into
their specific department (e.g. Sales, Marketing, Human Resources, Finance,
etc.). Each of these departments will have sub-departments by which the
survey information is further broken down.

Using the "password textbox" will prevent i.e. a Sales Manager to
view/change/add information to the survey data of the Finance
department/divisions.

There won't be a need to allow employee to change his/her password. Each
department/division will be given a unique password that if needed can be
changed by the survey administrator only.

So, let's say I'm the Sales Manager for the East Coast. Here's what the
process should be:

1. I open up the main form
2. I select "Sales" from the 1st combo box
3. Because of the selection "Sales", I will now see "West Coast", "East
Coast", etc. in the 2nd combo.
4. The Sales Manager was given a password... once entered properly, the
subform is now populated with questions (data) that require responses from
the East Coast Sales Manager.

So, my question is the following... how can I create such "password textbox"
that verifies the combination of e.g. "Sales", then "East Coast", then
password. If that 3-tier string is accurate, I'll get the appropriate
data. If a wrong password is entered, I'll get some error message.

Again, the passwords can be stored in some independent table and can only be
changed by the survery administrator.

I'd appreciate any ideas or pointers as to how I can design this. Maybe
someone even has a ready-to-go example that can be easily changed to my
criteria.

Thanks so much in advance,
Tom
 
N

Nick Coe \(UK\)

In Tom typed:
I need some help with designing a form that uses a
"password"
(textbox) and brings up a subform when the entered
password is
correct.
More specifically, here's what I have in mind...

Main Form:
1. There will be 2 cascading combo boxes (e.g. if "TX"
then "Austion
or El Paso", if "CA" then "Los Angeles or San Francisco",
etc.) on
the mainform . 2. There also should be some textbox that
uses a "masked entry" for a
password (using asterisks)

Sub Form:
1. Depending on the 2 values (e.g. "CA" & "Los Angeles")
chosen on the
mainform & if entered password is correct, the subform
should be
populated with data (datasheet view) that is part of the
"CA" & "Los
Angeles" combination.

More info...
Let me explain the process further (not using the
geography sample).

Essentially, I want to create a survey that will allow
employees to
log into their specific department (e.g. Sales, Marketing,
Human
Resources, Finance, etc.). Each of these departments
will have
sub-departments by which the survey information is further
broken
down.
Using the "password textbox" will prevent i.e. a Sales
Manager to
view/change/add information to the survey data of the
Finance
department/divisions.

There won't be a need to allow employee to change his/her
password. Each department/division will be given a unique
password that if
needed can be changed by the survey administrator only.

So, let's say I'm the Sales Manager for the East Coast.
Here's what
the process should be:

1. I open up the main form
2. I select "Sales" from the 1st combo box
3. Because of the selection "Sales", I will now see "West
Coast",
"East Coast", etc. in the 2nd combo.
4. The Sales Manager was given a password... once entered
properly,
the subform is now populated with questions (data) that
require
responses from the East Coast Sales Manager.

So, my question is the following... how can I create such
"password
textbox" that verifies the combination of e.g. "Sales",
then "East
Coast", then password. If that 3-tier string is
accurate, I'll get
the appropriate data. If a wrong password is entered,
I'll get some
error message.
Again, the passwords can be stored in some independent
table and can
only be changed by the survery administrator.

I'd appreciate any ideas or pointers as to how I can
design this. Maybe someone even has a ready-to-go example
that can be easily
changed to my criteria.

Thanks so much in advance,
Tom

That's a fair old mouthfull... :) Bit much for a newsgroup
answer really and hard to know what level to pitch the
answer.

That said, here are some rough suggestions.

Use syntax like Forms!MyForm!ComboBox1 to get the combo
selections into query criteria for the subform.

Hard code the password(s) into a vba routine or use a table
in a seperate (encrypted) mdb, first is easiest second is
theoretically more secure.

Depending upon password (Select Case would work nicely if
hard coded password) set source for subform. Or build sql
for it on the fly picking up the combo values as you go.

Your logic flow looks sound.

This won't really answer your questions but might point you
in the right direction.

--
Nick Coe (UK)
AccHelp v1.01 Access Application Help File Builder
http://www.alphacos.co.uk/
Download Free Copy
----
 
T

Tom

Thanks for the feedback...

Tom


Nick Coe (UK) said:
In Tom typed:

That's a fair old mouthfull... :) Bit much for a newsgroup
answer really and hard to know what level to pitch the
answer.

That said, here are some rough suggestions.

Use syntax like Forms!MyForm!ComboBox1 to get the combo
selections into query criteria for the subform.

Hard code the password(s) into a vba routine or use a table
in a seperate (encrypted) mdb, first is easiest second is
theoretically more secure.

Depending upon password (Select Case would work nicely if
hard coded password) set source for subform. Or build sql
for it on the fly picking up the combo values as you go.

Your logic flow looks sound.

This won't really answer your questions but might point you
in the right direction.

--
Nick Coe (UK)
AccHelp v1.01 Access Application Help File Builder
http://www.alphacos.co.uk/
Download Free Copy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top