Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Developers    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Upper Case Only
Amir Ouranus 
      
46 days ago
Hello,
In our organization we have 2 types of employees; Employees that their User ID number starts with an AA, and those whom starts with an AE.

How do I create a field in a form that no matter what a user types, it will change the AA, AE, or if they are a mix of upper and lower case to all upper case letters?

Thank you in advance for any help you can provide me.
Kevin Robertson  @Reply  
          
46 days ago
Kevin Robertson  @Reply  
          
46 days ago
Access Expert 25 covers String Functions - including UCase().
Richard Rost  @Reply  
          
46 days ago
Kevin pointed you in the right direction. Put this in the After Update event for that textbox:

UserID = UCase(UserID)

That will convert whatever they entered to uppercase as soon as they leave the field. So aa123, Ae123, or aA123 will all become AA123 or AE123.

If you also want to make sure the ID starts with only AA or AE, that is a separate validation step.
Amir Ouranus OP  @Reply  
      
42 days ago
Hi Richard,
I did something similar to that:

Private Sub ID_MMUID_AfterUpdate()

    Me.[ID-MMUID] = UCase([ID-MMUID])

Is that correct or should I do it the way you had it?

Also, my field does not turn grey and lock as soon as I type in an AE employee number.
Here's my code:

Private Sub UpdateContractDateLock()

    ' If the emplyoee has an AE Account then the Contract Date Field
    '   will be greyed out and will be locked.
    
    If Nz(Me.AAorAE.Value, "") = "AE" Then
        'AE Employees will never need a Contract Date
        'Me.ContractDate.Value = Null
        Me.ContractDate.Locked = True
        Me.ContractDate.BackColor = RGB(191, 191, 191)
                      
    Else
        ' AA Employees will have a Contract Date and may have a Hire Date
        Me.ContractDate.Locked = False
        Me.ContractDate.BackColor = RGB(255, 255, 255)
                
    End If
    
                    
    
End Sub

Amir Ouranus OP  @Reply  
      
42 days ago
I want it to turn grey and lock as soon as the AE number is typed in.
Also, I would like it to revert back to white and unlock if the AE number is deleted and / or deleted and an AA number is typed instead.
Amir Ouranus OP  @Reply  
      
42 days ago
I have to take out the Nz, because if the field is left blank, I don't want anything to happen.
Amir Ouranus OP  @Reply  
      
42 days ago
Oops this is the wrong thread.
I'll start a new thread.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developers.
 

Next Unseen

 
 
What's This?

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 9/21/2026 8:02:27 AM. PLT: 0s