Name Text format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to set the field format so that the first letter is a CAP. So
the user can just type it in. So it would Smith. I tried >L<l but this will
only let me type in 2 letters. what have I missed.???
 
I would like to set the field format so that the first letter is a CAP. So
the user can just type it in. So it would Smith. I tried >L<l but this will
only let me type in 2 letters. what have I missed.???
You wish to assure that only the very first letter in the field is a
capital letter, without regard for the other letters?

Let the user type the name however they wish.
In your Form, code the Control's AfterUpdate event:

[FieldName] = UCase(Left([FieldName],1) & Mid([FieldName],2))
 
I put the Cone into a text field and got and error. I only needed to change
the Fieds name to Fname so it looked like this:

[FName] = UCase(Left([FName],1) & Mid([FName],2))

I Put the code in the following on the form Control Source, input Mask and
pormat. I did it one at a time and no luck. Also put it in the table Field
Format and Input Mask.

What did I miss?

fredg said:
I would like to set the field format so that the first letter is a CAP. So
the user can just type it in. So it would Smith. I tried >L<l but this will
only let me type in 2 letters. what have I missed.???
You wish to assure that only the very first letter in the field is a
capital letter, without regard for the other letters?

Let the user type the name however they wish.
In your Form, code the Control's AfterUpdate event:

[FieldName] = UCase(Left([FieldName],1) & Mid([FieldName],2))
 
I put the Cone into a text field and got and error. I only needed to change
the Fieds name to Fname so it looked like this:

[FName] = UCase(Left([FName],1) & Mid([FName],2))

I Put the code in the following on the form Control Source, input Mask and
pormat. I did it one at a time and no luck. Also put it in the table Field
Format and Input Mask.

What did I miss?

fredg said:
I would like to set the field format so that the first letter is a CAP. So
the user can just type it in. So it would Smith. I tried >L<l but this will
only let me type in 2 letters. what have I missed.???
You wish to assure that only the very first letter in the field is a
capital letter, without regard for the other letters?

Let the user type the name however they wish.
In your Form, code the Control's AfterUpdate event:

[FieldName] = UCase(Left([FieldName],1) & Mid([FieldName],2))

The Code I gave you does not go in the control's Control Source or
Input mask, or Format. It goes in the control's AfterUpdate event.
In your Form, code the Control's AfterUpdate event:
[FieldName] = UCase(Left([FieldName],1) & Mid([FieldName],2))

Set the Control's Control Source to [FName]

Then click on the control's property sheet and click on the tab that
says Events.
On the line that says After Update write
[Event Procedure]
Next click on the button with the 3 dots that will appear on that
line.
When the code window open the cursor will be flashing between 2
already existing lines of code.
Write:

[FName] = UCase(Left([FName],1) & Mid([FName],2))

between those 2 lines.
Exit the code window.
That should do it for new data when entered.
 
Back
Top