Re: Number entry (leading zeros)



LFM wrote:

I am sure there is a simple answer.

I have a database that where I am trying to setup a security login
based on employee number.

Employee number is a 5 character numeric field. The databse has a sql
odbc link into the HR system to pull the emp number, emp name, and a
few other key fields. Because of the way the sql/odbc link is - this
field is a text field

Example emp numbers are:
00063
01222

On the login form, I have an unbound text box.

I've put an input mask of "00000" and default value of 0

I would like to make it so that the data entry starts from the right
side of the box. In otherwords, I would like to make it so that if the
person with employee number 63 goes to login, he only needs to type in
63 and not 00063. I would like the field to automatically add the
preceeding zeros if necessary.

In your AfterUpdate event of the field you could do something like
Me.SecID = Right("00000" & Me.SecID,5)
.



Relevant Pages

  • Re: Login questions
    ... Users login into domains. ... If you want all people in Company A to see Company A resources, ... Groups, Group Policy, ... > login under the OU name company A only, and employee B to login under OU ...
    (microsoft.public.windows.server.active_directory)
  • RE: Confusing Type Mismatch
    ... These tables are joined on Employee ID ... form to update the login table with the new data: ... Private Sub EmpID_AfterUpdate ... don't get it because oldEmpID and the EmpID field of the login table is text. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Rename user login IDs
    ... Pros & Cons of changing Login IDs. ... If you have employee ids stored in AD, it would work in a similar way to ... They want it to be rolled out for exisiting users aswell, ...
    (microsoft.public.windows.server.active_directory)
  • Number entry (leading zeros)
    ... Employee number is a 5 character numeric field. ... odbc link into the HR system to pull the emp number, emp name, and a ... On the login form, I have an unbound text box. ...
    (comp.databases.ms-access)
  • RE: Error when returning user-defined class from "factory" class..
    ... Set getEmployee = Nothing ... Set emp = New Employee ... As well as setting "employee" to nothing before the call to getEmployee ... Excel I've created a Factory class to instantiate objects and return them. ...
    (microsoft.public.excel.programming)