Using "Proper" Format In Access

jobb

Board Regular
Joined
Apr 24, 2003
Messages
78
In Excel, you can format text using PROPER so that the first letter of each word is capitalized, and the rest are lower case. Is there a similar way I can use this as a calculated field in Access?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
I think you'll have to use a function. Paste the following function into a module:
Code:
Function GoProper(strText As String) As String
    GoProper = StrConv(strText, vbProperCase)
End Function
Then, you can use GoProper in your query, something like:
  • Proper: GoProper([fldToMoveToProperCase])
or
  • Proper: GoProper([fld1] & " " & [fld2])
Hope this helps - let us know if you have questions,

Russell
 
Upvote 0
okay, I've never used modules before, but I tried it, and I saved it as "GoProper". Then I put it in the query like you said and I got an error message "Undefined function 'GoProper' in expression.
 
Upvote 0
Would need more info. Can you paste your SQL? Also, don't save the module as GoProper - save it as something else.

To view the SQL, open your query in Design View, then go to View-SQL View.

-rh
 
Upvote 0
thanks for your help..

Here is the SQL from my append query.

INSERT INTO [USB Leads Import table] ( Name )
SELECT Properize([primary borrower] & " " & [MI]) AS [prim borrower]
FROM [Focus Import];

I renamed what you told me to put into a module "properize". I'm still getting the "Undefined function" error message.
 
Upvote 0
never mind.. I figured it out. I needed to use "goproper" in my query, not "properize". Thanks again!
 
Upvote 0

Forum statistics

Threads
1,221,574
Messages
6,160,602
Members
451,657
Latest member
Ang24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top