format text

  • Thread starter Thread starter GeoffreY
  • Start date Start date
G

GeoffreY

I am trying to format text so that the first letter of a
word is automatically a capital. I know that if i use > i
can make everyting a capital but how do i just get the
first letter capitalised?
 
Thanks for the info. I have tried to put the formula in
the format box in field properties in design view ? but
it does not seem to work. Am i putting it in the correct
place?
Cheers

Geoff
 
That's not a format: it's a VBA function that will product a new value.

You put it In the BeforeUpdate of the text box on your form, or you can use
it in an UPDATE query to change what's stored in your table.
 
That's not a format: it's a VBA function that will product a new value.

You put it In the BeforeUpdate of the text box on your form, or you can use
it in an UPDATE query to change what's stored in your table.

I think Doug miss-spoke.
If you are doing this on a form, to change just entered data, it
belongs in the control's AfterUpdate event.

Display the control's property sheet.
Click on the Events tab.
On the AfterUpdate line, write:
[Event Procedure]

Then click on the button with the 3 dots that will appear on that
line.
When the code window opens, the cursor will be flashing between two
already existing lines of code.
Between those 2 lines, write:
[MyText] = StrConv([MyText], 3)

Exit the code window and save the changes.

Change [MyText] to whatever the actual name of the control is.

Note... If you use the function in an update query, you must use
strConv([MyText],3).
In a VBA code window, you can use either vbProperCase or it's value,
3.
 
fredg said:
I think Doug miss-spoke.
If you are doing this on a form, to change just entered data, it
belongs in the control's AfterUpdate event.


If you want the data to be formatted in the table, I think the BeforeUpdate
event makes more sense, Fred.
 
Don't you get an error if you try to change the value that was entered while
in the BeforeUpdate event's code?
 
Thanks i tried the formula and followed the instructions
and it works fine .Thanks very much for the help. ps i
did not realise that you do not leave the square brackets
in the formula.It works once you take them out.Many thanks
-----Original Message-----
 
Back
Top