JohnLee
01-21-2008, 05:42 AM
Hi Folks,
Does anyone know how I can use the Proper Function in an append query.
I have a field whereby all the data is in UPPER case, but I only want the first character of each word to be upper case.
I have looked up the Proper function, which should do the job, but when I apply it in the specified field I get an "Undefined function "Proper" in expresssion message
my expresssion is as follows: salutation: Proper([strSalutation])
Any assistance would be greatly appreciated.
John
boblarson
01-21-2008, 05:46 AM
Use the StrConv function to convert instead
JohnLee
01-22-2008, 12:43 AM
Hi,
Thanks for your response, but how would I use the StrConv Function to ensure the first characters of each word is uppercase and the rest lowercase.
When I tried this "Salutation: strConv([strSalutation])" I got an arguments error message.
Can you tell me what the expression needs to look like.
Your assistance would be appreciated.
John
chergh
01-22-2008, 01:04 AM
You need to provide an argument which tells the function what conversion to do.
Read the help file first then if you can't figure it out come here and ask. Seeing as you obviously haven't read the helpfile, if you had you wouldn't be asking, I won't bother providing the solution.
JohnLee
01-22-2008, 01:06 AM
Hi,
Thanks for that, but how do I do that, I don't know how to construct them. If you know I would appreciate your help.
John
Brianwarnock
01-22-2008, 01:20 AM
From help
Syntax
StrConv(string, conversion, LCID)
The StrConv function syntax has these named arguments:
Part Description
string Required. String expression to be converted.
conversion Required. Integer. The sum of values specifying the type of conversion to perform.
LCID Optional. The LocaleID, if different than the system LocaleID. (The system LocaleID is the default.)
Settings
The conversion argument settings are:
Constant Value Description
vbUpperCase 1 Converts the string to uppercase characters.
vbLowerCase 2 Converts the string to lowercase characters.
vbProperCase 3 Converts the first letter of every word in string to uppercase.
There's more but seems straightforward. also a search of the forum using propercase will reveal more info
Brian
boblarson
01-22-2008, 05:06 AM
John, if you go to the code window and typ strConv and put your cursor on it and then hit F1 it brings up the help associated with it. The help file can be very useful as it will usually show the function with an example. Remember, you shouldn't need to be spoonfed everything. You will need to learn how to find out how to use a function, property, or method by doing this.