Use macro to have a password entered

G

Guest

I have one form that is accessed from a switchboard that we want only a
handful of people to access. We want just one password that those people
would know. Users are not loggin in or anything. I was going to build a
form which just one textbox for them to enter the password and then have a
macro decide if they've entered the right password and if so, open the next
form. I've search around and found some suggestions that involved coding,
but that is way over my head. Is there a way to build a macro that
determines if the right word was typed in? I tried to the WhereCondition to
set that field= to the password, but that didn't seem to work. I'd love some
help! Thank you in advance!
 
S

Steve Schapel

Kathy,

In your macro, you can use a Condition for your OpenForm action. If you
can't see a Condition column in the macro design window, select it from
the View menu. Then, just enter the equivalent of this...
[NameOfYourTextbox]="ThePassword"
 
G

Guest

EXCELLENT!

Worked like a breeze! Why do folks put involved coding in when something so
simple accomplishes it?

Thank you, thank you, Steve!

Steve Schapel said:
Kathy,

In your macro, you can use a Condition for your OpenForm action. If you
can't see a Condition column in the macro design window, select it from
the View menu. Then, just enter the equivalent of this...
[NameOfYourTextbox]="ThePassword"

--
Steve Schapel, Microsoft Access MVP

I have one form that is accessed from a switchboard that we want only a
handful of people to access. We want just one password that those people
would know. Users are not loggin in or anything. I was going to build a
form which just one textbox for them to enter the password and then have a
macro decide if they've entered the right password and if so, open the next
form. I've search around and found some suggestions that involved coding,
but that is way over my head. Is there a way to build a macro that
determines if the right word was typed in? I tried to the WhereCondition to
set that field= to the password, but that didn't seem to work. I'd love some
help! Thank you in advance!
 
G

Guest

Sorry, I spoke too soon. I forgot to test if I didn't put the right password
in. Somehow I'm doing something wrong still. And it's asking me to put the
password in twice -- once in the "Enter Password" form I built with the text
box to enter the password (the one where I put the INput Mask to Password to
get the astericks). Then once I type it in, another window pops up asking me
to Enter the password. Here's what I've done:

In the field on the switchboard that I want to protect access to, I've put a
macro in the "On click" line that says "OpenForm" and then directs it to
open the form with the one field to type in the password. On the "After
Update" line of that text box (i nthe password form) I've put a macro that
uses "OpenFOrm" and the Where COndition [textbox name]="password".

When I run it, it opens the form whether they type in the right password or
not. Also, as I mentioned, it asks for the password twice, once with my
password entry form and once with a pop up.

Sorry, I obviously need more explicit directions here. Can you help? Thanks

Steve Schapel said:
Kathy,

In your macro, you can use a Condition for your OpenForm action. If you
can't see a Condition column in the macro design window, select it from
the View menu. Then, just enter the equivalent of this...
[NameOfYourTextbox]="ThePassword"

--
Steve Schapel, Microsoft Access MVP

I have one form that is accessed from a switchboard that we want only a
handful of people to access. We want just one password that those people
would know. Users are not loggin in or anything. I was going to build a
form which just one textbox for them to enter the password and then have a
macro decide if they've entered the right password and if so, open the next
form. I've search around and found some suggestions that involved coding,
but that is way over my head. Is there a way to build a macro that
determines if the right word was typed in? I tried to the WhereCondition to
set that field= to the password, but that didn't seem to work. I'd love some
help! Thank you in advance!
 
S

Steve Schapel

Kathy,

I'm not quite sure I understand. With the OpenForm action in the macro
that runs on the After Update of the textbox on the password form...
which form does this OpenForm action open? Is it the Switchboard form,
which is already open?

I would not recommend using the Click event of a textbox to do anything.
Anyway, why not just have the textbox for the entry of the password
directly on the switchboard from instead of invoking a separate form?
As I said, I don't quite understand.

But anyway, the main point here is that the [textbox name]="password"
does not go in the Where Condition argument of the OpenForm action in
the macro. It goes in the Condition *column* of the macro design
window, to the left of the Action. If you can't see a Condition column
in the macro design window, select it from the View menu.
 
G

Guest

I got it. I didn't realize there was a whole other "Condition" section. I
found it, though. Its' running smoothly now. Thank you!


Steve Schapel said:
Kathy,

I'm not quite sure I understand. With the OpenForm action in the macro
that runs on the After Update of the textbox on the password form...
which form does this OpenForm action open? Is it the Switchboard form,
which is already open?

I would not recommend using the Click event of a textbox to do anything.
Anyway, why not just have the textbox for the entry of the password
directly on the switchboard from instead of invoking a separate form?
As I said, I don't quite understand.

But anyway, the main point here is that the [textbox name]="password"
does not go in the Where Condition argument of the OpenForm action in
the macro. It goes in the Condition *column* of the macro design
window, to the left of the Action. If you can't see a Condition column
in the macro design window, select it from the View menu.

--
Steve Schapel, Microsoft Access MVP

Sorry, I spoke too soon. I forgot to test if I didn't put the right password
in. Somehow I'm doing something wrong still. And it's asking me to put the
password in twice -- once in the "Enter Password" form I built with the text
box to enter the password (the one where I put the INput Mask to Password to
get the astericks). Then once I type it in, another window pops up asking me
to Enter the password. Here's what I've done:

In the field on the switchboard that I want to protect access to, I've put a
macro in the "On click" line that says "OpenForm" and then directs it to
open the form with the one field to type in the password. On the "After
Update" line of that text box (i nthe password form) I've put a macro that
uses "OpenFOrm" and the Where COndition [textbox name]="password".

When I run it, it opens the form whether they type in the right password or
not. Also, as I mentioned, it asks for the password twice, once with my
password entry form and once with a pop up.

Sorry, I obviously need more explicit directions here. Can you help? Thanks
 

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