Input Mask / SSN

  • Thread starter Secret Squirrel
  • Start date
S

Secret Squirrel

Is it possible to have a Social Security # show up as ***-***-**** for
certain users and have it show the actual # for other users?
 
A

Arvin Meyer [MVP]

If you implement user-level security in Access 2003 and earlier, or if you
use Windows authentication to identify your users:

http://www.mvps.org/access/api/api0008.htm

you can use an if statement in the form load or open event to change how the
field displays:

Private Sub Form_Load()

If fOSUsername() = "SecretSquirrel" Then
Me.txtSSN.InputMask = "Password"
Else

End If
End Sub
 
B

BrookieOU

Hi,

I tried everything that was tried below and this is the error message I am
now getting...

"Expected variable or procedure, not module"

When I press Help this is what I get...

"There is no variable or procedure by this name in the current scope, but
there is a module by this name. This error has the following cause and
solution:


The name of a module is used as a variable or procedure.
Check the spelling of the variable or procedure name, and make sure the name
you want to refer to isn't private to another module. A module name can be a
qualifier, but can't stand alone."

I set up the Windows authentication per the link, but I can't figure out how
to fix this part of it. Could someone please help!!!!

Thanks,
Brooke
 
D

Douglas J. Steele

Where did you put the code from the site cited?

Everything in the shaded area (between Code Start and Code End) should be
copied into a new module (not a class module nor a module associated with a
form or report). The name of the module cannot be the same as the name of
any functions or subs in your application.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)
 
J

John W. Vinson

"There is no variable or procedure by this name in the current scope, but
there is a module by this name. This error has the following cause and
solution:

This can happen if you use the same name for the procedure (Public Function
XYZ... or Public Sub XYZ...) as for the Module. Rename the module from XYZ to
basXYZ and this should go away.
 
H

Howard Burgman

BrookieOU said:
Hi,

I tried everything that was tried below and this is the error message I am
now getting...

"Expected variable or procedure, not module"

When I press Help this is what I get...

"There is no variable or procedure by this name in the current scope, but
there is a module by this name. This error has the following cause and
solution:


The name of a module is used as a variable or procedure.
Check the spelling of the variable or procedure name, and make sure the
name
you want to refer to isn't private to another module. A module name can be
a
qualifier, but can't stand alone."

I set up the Windows authentication per the link, but I can't figure out
how
to fix this part of it. Could someone please help!!!!

Thanks,
Brooke
 

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