Link to home
Start Free TrialLog in
Avatar of PJ_KD
PJ_KD

asked on

Need to pull last 4 digits from an entered field and store this info in the form and in the table

New employees are entered into our Access database through an Employee Form.  The last 4-digits of their SSN is used as their Payroll number.  I would like to have the 4 digits automatically stored in the Employee table and displayed on the Employee form to avoid an individual mis-keying this information.  
I have limited Access knowledge so an easy to implement solution would be welcome.
A very quick response would be appreciated since we need this field for a Payroll conversion we are performing.
SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PJ_KD
PJ_KD

ASKER

I had tried this and for some reason the Right function is being rejected as an unacceptable function to use in the Control Source Property.  It was also not accepted in an Update Query.
I also would like to store this 4 digit value in the Table so that I can export the table contents to an Excel spreadsheet that is then imported into our payroll system.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PJ_KD

ASKER

Although the Right function should work, even after checking all of the references that could be checked, the Right function is not being recognized.  This database is Access 97 and Right should work, but I can't find what else to check.  I will keep looking.
Exit your DB.  The go to START->Run - copy and paste:

regsvr32 C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL

Avatar of PJ_KD

ASKER

I have scanned the C: drive and the Office 97 installation disk and the VBE6.dll file is not present.  I will look on Microsoft's web site and see if there is something that I can download. Thank you for your ongoing comments.
Avatar of PJ_KD

ASKER

I am looking at the link that you referenced and will see if that helps.  I will be back in touch.
Avatar of PJ_KD

ASKER

Thanks for both of your assistance.  It took me a while to figure out that I had some extra references that were preventing the "Right" function from working.  After the References in the Module area were set correctly, your help resulted in the resolution of my issue.

Many thanks.
Glad to help out.