G
Guest
i need to add this code to one of the feilds in my access report:
Public Function GetID(Expr3 As Integer) As Integer
If Len([Expr3]) = 3 Then
Expr3 = [Expr3] & "00000"
Else
If Len([Expr3]) = 5 Then
Expr3 = "470502" & [Expr3]
End Function
what i'm trying to do here is get the length of the feild in the report and
depending on that i want to modify that feild by adding the proper prefix or
suffix. i wrote the code in the code builder but it doesn't seem to be doing
anything. i don't think that my report or my field even know about this code.
how do i attacd or match or add that peice of code to my report? thank you
p.s i don't really know how to use the code builder so i would apreciate a
detailed answer thank you
Public Function GetID(Expr3 As Integer) As Integer
If Len([Expr3]) = 3 Then
Expr3 = [Expr3] & "00000"
Else
If Len([Expr3]) = 5 Then
Expr3 = "470502" & [Expr3]
End Function
what i'm trying to do here is get the length of the feild in the report and
depending on that i want to modify that feild by adding the proper prefix or
suffix. i wrote the code in the code builder but it doesn't seem to be doing
anything. i don't think that my report or my field even know about this code.
how do i attacd or match or add that peice of code to my report? thank you
p.s i don't really know how to use the code builder so i would apreciate a
detailed answer thank you