TlKelley.
P.S: Here´s my code
Note: Normaly My docs nr are like : 21D20001 --> TypeDoc 21 , Dec, 2002, Sequential Nr 0001.
MY FUNCTION :
Public Function MyFunc(DocNum As String) As String
Dim Month As String
Select Case Mid(DocNum, 3, 1)
Case 1 To 9 ' <-----Means the Month digit is numeric
MyFunc = Mid(DocNum, 1, 2) & "0" & Mid(DocNum, 3, Len(DocNum))
Case "O"
Month = 10
MyFunc = Mid(DocNum, 1, 2) & Month & Mid(DocNum, 4, Len(DocNum))
Case "N"
Month = 11
MyFunc = Mid(DocNum, 1, 2) & Month & Mid(DocNum, 4, Len(DocNum))
Case "D"
Month = 12
MyFunc = Mid(DocNum, 1, 2) & Month & Mid(DocNum, 4, Len(DocNum))
End Select
End Function
------------------------------------------------------------------------~
I've tested the function with things writed on a textbox ( simulating argument) and it works, but not with my Doc_Number Database field argument, like you've told me !!! ????
Enter your message below
Sign in or Join us (it's free).