Results 1 to 8 of 8
  1. #1
    jlgray0127 is offline Competent Performer
    Windows 2K Access 2000
    Join Date
    Oct 2011
    Location
    Central Illinois
    Posts
    193

    Data Entry Format

    I need to have all my data entered in all fields, on all forms, in CAPS.
    I found the below code, but can't seem to get it to work in Access 2000



    Any thoughts?

    Private Sub Form_KeyPress(KeyAscii As Integer)

    KeyAscii = Asc(UCase(Chr(KeyAscii)))

    End Sub

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Do you have KeyPreview set to Yes?

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Out of curiosity, why do you need all of the data in UpperCase? You can always display it that way regardless of the way it is entered and unless you make some changes, Access is *not* case sensitive.

  4. #4
    jlgray0127 is offline Competent Performer
    Windows 2K Access 2000
    Join Date
    Oct 2011
    Location
    Central Illinois
    Posts
    193
    The SQL Server I am connected to will not accept lower case, so when I am trying to tie my data to the SQL Data for reporting, it does not find the values I am seeking.

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Thanks. What is your answer to my question in Post #2?

  6. #6
    jlgray0127 is offline Competent Performer
    Windows 2K Access 2000
    Join Date
    Oct 2011
    Location
    Central Illinois
    Posts
    193
    Oh... No I don't... I added this code to the KeyPress event

    Private Sub [YourControlName]_KeyPress(KeyAscii As Integer)
    KeyAscii = Asc(UCase(Chr(KeyAscii)))
    End Sub

  7. #7
    jlgray0127 is offline Competent Performer
    Windows 2K Access 2000
    Join Date
    Oct 2011
    Location
    Central Illinois
    Posts
    193
    If I enter the code in Post one, and change the Property to yes, will this fix the issue I was having with trying to declare the event against the form?

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    You will not get a KeyPress event until you set KeyPreview to yes.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. data entry
    By harry53 in forum Forms
    Replies: 1
    Last Post: 07-31-2011, 03:03 AM
  2. format of text data type
    By frcastro in forum Access
    Replies: 4
    Last Post: 06-23-2010, 09:36 AM
  3. data entry
    By ngeng4 in forum Forms
    Replies: 22
    Last Post: 03-18-2010, 07:12 PM
  4. Please Help, How Do I Format this Data?
    By txdave36 in forum Access
    Replies: 6
    Last Post: 09-09-2009, 04:31 PM
  5. Data Entry And Data Recalling
    By GeeDee in forum Access
    Replies: 0
    Last Post: 05-01-2007, 05:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums