a simple password form

neilb

Board Regular
Joined
Apr 18, 2002
Messages
128
Hi
o_O
I have just started to use Access after using Excel for the last 2 years.

I am trying to write a simple password form. What I have done so far is created the form with 1 combo to enter the user ID and one text box to enter the password.

I am then trying to write a simple if then statement in VBA which checks the user ID and Password.

How do I use the inputted user ID and Password from the form in the VBA?

I have tried
DIM USERID as string
DIM Password as string

UserID="[userid]"
password="[password]"

I have put the form fields in [].

Can any one help :pray:

cheers
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Try something like:
Code:
UserID=Me.txtUserID
Password=Me.txtPassword
Where txtUserID is the name of the text box on your form...

HTH,

Russell
 
Upvote 0

Forum statistics

Threads
1,221,539
Messages
6,160,412
Members
451,644
Latest member
hglymph

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top