×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ComboBox Search - UpperCase

ComboBox Search - UpperCase

ComboBox Search - UpperCase

(OP)
I have a combo box on a form with the following code in the After Update event:

' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Name] ='" & Me![Combo77] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

I want the data displayed in the combobox to be Upper Case.

The ">" does not work in the properties format; Nor does the Ucase work in the underlying query.

Is there a line of code that can be added to the after update event procedure that will accomplish this?
Or should there be an event procedure in "lost focus"

Thank you in advance for any help that you can give.

RE: ComboBox Search - UpperCase

By "underlying query" are you referring to the Combo Box Row Source or something else? I would expect uCase() to always work.

Is there a reason you want uppercase? I assume you understand Access is case in-sensitive.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: ComboBox Search - UpperCase

(OP)
Yes, the combo Row source.
The ucase works on the individual field like 'lastname' and 'firstname'
but when I combine them to display like this: Solórzano, Debra, that field reverts back to however the data was entered.
I also have the ">" in the table format for both fields.

Thanks for any insight!

RE: ComboBox Search - UpperCase

Can you provide the Row Source? I would expect something like this would work:

CODE --> sql

SELECT PersonID, UCase([LastName] & ", " & [FirstName]) FROM tblYourTable 

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: ComboBox Search - UpperCase

(OP)
This is what I have.. AND today it is working. go figure!

SELECT [ucaselst] & ", " & [ucasefrst] AS Name, Clients.ClientId, Clients.LastName, Clients.FirstName, UCase([Clients.LastName]) AS ucaseLst, UCase([Clients.FirstName]) AS UcaseFrst
FROM Clients
WHERE (((Clients.LastName) Is Not Null))
ORDER BY Clients.LastName;

Thank you so much for your input!

RE: ComboBox Search - UpperCase

I am kind of surprised that "it is working", unless you have two fields in your Clients table named ucaselst and ucasefrst ponder


---- Andy

There is a great need for a sarcasm font.

RE: ComboBox Search - UpperCase

Andy,
These are derived columns and I never use them in other expressions as monkeysee has done. Also, I would never alias an expression with the name "name". Name is a property and shouldn't be used anywhere else. I would use:

CODE --> SQL

SELECT UCase([LastName]) & ", " & UCase([FirstName]) AS FullName, ClientId, 
LastName, FirstName, UCase([LastName]) AS ucaseLst, UCase([FirstName]) AS UcaseFrst
FROM Clients
WHERE LastName  Is Not Null
ORDER BY LastName, FirstName; 

If this is a combo box row source I'm not sure you need all of the columns.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: ComboBox Search - UpperCase

Now, your - Duane - SQL I can understand smile
I would by-pass all [ and ] since there are no spaces or reserved words used in the fields or table's names.


---- Andy

There is a great need for a sarcasm font.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close