Format Question (1 Viewer)

tammythack

Registered User.
Local time
Today, 15:40
Joined
Feb 11, 2003
Messages
10
Help! Simple format question

In a text field of a table - I know that using ">" in the format prpoerties, all the letters in a word will appear capitolized, but I want to be able to set the formating so the first letter will apear capitolized and the rest of the letters in the word are lower case, can that be done?

Thanks
Tammy
 

Mile-O

Back once again...
Local time
Today, 23:40
Joined
Dec 10, 2002
Messages
11,316
If the table is linked to a form, you might find it easier to use the StrConv function on the AfterUpdate event of your control.

i.e

txtYourTextBox = StrConv(txtYourTextBox, vbProperCase)
 

Mile-O

Back once again...
Local time
Today, 23:40
Joined
Dec 10, 2002
Messages
11,316
Damn duplicate postings.
 

tammythack

Registered User.
Local time
Today, 15:40
Joined
Feb 11, 2003
Messages
10
Well if you haven't guessed by now I am very new to Access...
I am suposed to create a simple table and in the design view, using the formatting properties, set it so I get the proper case.

Apoligies for the double entry, I've fixed it.

Mile-O-Phile said:
If the table is linked to a form, you might find it easier to use the StrConv function on the AfterUpdate event of your control.

i.e

txtYourTextBox = StrConv(txtYourTextBox, vbProperCase)
Well if you haven't guessed by now I am very new to Access...
 

tammythack

Registered User.
Local time
Today, 15:40
Joined
Feb 11, 2003
Messages
10
I tried using the code you provided, changing "TheName" to "LastName" and "FirstName" as those are the names of the fields I need to format, but it didn't work.
Perhaps I am making this more difficult than it needs to be. Here is the deal I am a begining Access student, - our teacher challenged us to create a [simple] table with a first name and a last name field, any text entered into either field should appear with the first letter of the names in upper case and the rest of the letters in lower case, no matter how it is entered.
I know that using ">" in the format box will make all the letters upper case, and that using "<" will make all the letters lower case. But how do I format the fields to display both and upper and lower case appropriately for a proper name?

Tammy

pono1 said:
Tammy,

If you're sure this is the way you want to go, you can try using the following line as the Validation rule, replacing TheName with the actual name of your field.

Code:
Asc(Left([TheName],1))>=65 And Asc(Left([TheName],1))<=90

Regards,
Tim
 
Last edited:

Jon K

Registered User.
Local time
Today, 23:40
Joined
May 22, 2002
Messages
2,209
I think what you need is an Input Mask like this:-

>L<?????????????????????????????????


(put as many ?'s as needed)
 

tammythack

Registered User.
Local time
Today, 15:40
Joined
Feb 11, 2003
Messages
10
I see that you used a form to format the fields,
you used a validation rule for the last name field
you used an input mask for the first name field
and i don't know what the heck it was you did for the middle name field other than i think it was done in visual basic.
I see that I can use the same input mask that you used in the form, for the input mask of a table.
Thanks!
Tammy


pono1 said:
Like so...

Regards,
Tim
:D
 

tammythack

Registered User.
Local time
Today, 15:40
Joined
Feb 11, 2003
Messages
10
HAVE FUN WITH IT!?!? :rolleyes: you must be mad...
The guy I sit next to in class was so excited to find out that you are able to set a password to protect access to a data base that he was giddy —I bet he could have fun with it.
As for me, I just pray that I can make it through this class with passing grade. I know absoutly nothing about visual basic.
Once I examined the data base you uploaded, I was able to locate in the help files, the list of Valid input mask characters. then I could make sence of the mask you created.
I hate those darn help files, they are pretty much useless unless you already know the answer.

Thanks again for helping, I really appreciate it.
Tammy


pono1 said:
Tammy,

Yes, an input mask (as well as a validation rule) can be set on a control on a form or on a field in a table -- if set on the table, then no matter how many forms are created with a control that is bound to that field, the input mask or validation rule will apply.

To see the Visual Basic code behind the middle name, right-click the form's title bar, choosing Form Design from the context menu. Press Alt-F11 to bring up VBA. Highlight "StrConv(Me.MiddleName, vbProperCase)" in the code window and press F1 to learn more.

Also, if there's more than one word entered (like Billy Bob) in one of these controls, only the code solution will capitalize both words.

Have fun with it -- if that's possible.

Regards,
Tim
 

Users who are viewing this thread

Top Bottom