Hi Guy's i am looking to grab the 2 initials of DrFullName, the code below will return the initial from forename and the last letter of surname, can i retrieve the first letter of surname ?
DrFullName = "Joe Bloggs"
Inits is set to a string
Inits is returning J S
Can i retrieve J B ?
Code:
FullName = DLookup("Name", "tblDealers", "[RecordNo] = " & RecNo)
DelDate = DMax("DeliveryDate", "tblAssign", "[DelTo] = '" & FullName & "'")
DrFullName = DLookup("Driver", "tblAssign", "[DelTo] = '" & FullName & "'" & " And [DeliveryDate] = #" & Format(DelDate, "mm/dd/yyyy") & "#")
MyStr = InStr(DrFullName, " ")
DrFName = Left(DrFullName, MyStr)
DrSName = mID(DrFullName, MyStr)
Inits = Left(DrFName, 1) & " " & Right(DrSName, 1)