Trimming Characters

N

Nick hfrupn

I have two fields in a form, FirstName and Initial. How can I add the first
letter of the first name into the Initial field. I assume it would happen
after update?

Regards
Nick
 
D

Damian S

Hi Nick,

Not sure why you would want to save the Initial from their first name when
it's so easy to calculate, but anyway, here's how you would do it.

in the After Update event of the first name field, put the following code:

me.txtInitial = iif(isnull(me.txtFirstName), "", left(me.txtFirstName, 1))

Hope this helps.

Damian.
 
N

Nick hfrupn

Hi again Damian,
As you have probably guessed by my other posts, I am fairly amateuristic
with access. I got you suggestion to work.
As you said a calculation may be easier, I would be interested to find out
how.

Thanks again for your patience.
Regards
Nick
 
Top