Uppercase and Next/Prvs Cmd buttons

Posted on 2003-02-21
Medium Priority
Last Modified: 2012-06-21

I was just wondering about a couple of things.

Firstly I would like to force a text box to uppercase, or at least store the data entered in uppercase. I'm sure this is very simple but I can't for the life of me figure it out!

Secondly I would like a command button to continuously scroll through records (like the navigation buttons). I do not want the navigation buttons to be shown on my form therefore scrolling through records is currently very slow (click click click etc)!!!

Thanks all.
Question by:Gustus
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 41

Accepted Solution

shanesuebsahakarn earned 120 total points
ID: 7992739
For your first problem, set the InputMask of the text box to:

For your second problem, the only way I can think to do this is to combine the MouseDown, MouseUp and Timer events. In the MouseDown event of the command button, set a global form variable to true. In the Timer event, which you can set to fire at an interval to suit yourself, check if that variable is true. If it is, then go to the next record. In the MouseUp event, set the variable to false.
LVL 44

Expert Comment

ID: 7992763
two possibilities for #1)

Use the Lost Focus Event or the KeyPress Event:

Private Sub txtTextBox_LoastFocus()
   txtTextBox.Text = UCase$(txtTextBox.Text)
End Sub


Private sub TxtTextBox_KeyPress(KeyAscii as Integer)
   If keyAscii >= Asc("a") and KeyAscii <= asc("z") then
       KyeAscii = KeyAscii -32
   End If
End Sub

The first will allow lowercase entry, and then convert the ENTIRE text to Upppercase, when the user tabs off the text box.

The second will convert the lower case to uppercase 'on the fly', so the user will not be aware that anything has taken place.


Author Comment

ID: 7993733

Thanks both but I am still struggling with the scrolling record button. Any ideas anyone?
LVL 18

Expert Comment

ID: 8708038
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept question, points to shanesuebsahakarn
Please leave any comments here within the next seven days.
EE Cleanup Volunteer

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question