Trimming Characters

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

Guest

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
 
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top