PC Review Forums Software Windows XP & Applications MS Access 2003

Reply
 
Thread Tools Rate Thread
Old 02-04-2008, 10:30 AM   #1
jjstccean
Junior Member
 
Join Date: Apr 2008
Posts: 3
Trader Rating: (0)
Unhappy MS Access 2003

I need assistance to create a function to do the following please: Besides the 'autonumber' in my table I have field named MemberNum. Also FirstName & LastName. I need to have the MemberNum updated after the LastName has been updated. (see After Update Procedure)

I would like to have the MemberNum look like this: The LastName is Eastwood. Result in MemberNumber = "CEAS0001"

My effort:
Private Sub Surname_AfterUpdate()
Me.MemberNumber = "C" & Left(Me![LastName], 3) & [memID] + 1 'memID is the autonumber
End Sub

What can I do to make the end result look like this: CEAS0001 I'm certain I miss inserting a Format() here for the number result, but I'm not entirely certain how to phrase it. Requiring the leading 3 zero's as part of the number which when it increments will eventually be replaced looking like 0010 or 0102

I would really appreceate any assistance.

Thank you.

jjstccean.
jjstccean is offline   Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off