I've written a very large procedures which exceeds the 64Kb limit for procedures, so I get an error when compiling saying that the procedure is too large and that I need to break it up. My problem is that this procedures looks at a field on my form which stores U.S. Navy rating (which are essential the person's job title). For example it looks at a field entitle [RATE] and the uses a series of If Then Else states to figure out what the rate is.
If Left(RATE, 2) = "YN" And Right(RATE, 1) = "1" Then
RateName = "Yeoman First Class"
ElseIf Left(RATE, 2) = "YN" And Right(RATE, 1) = "C" Then
RateName = "Chief Yeoman"
etc...
This goes on for all 75+ ratings in the Navy, so the procedure is very large. I've tried breaking it up into two functions but how can I call both of these functions at the same time. I.E., call function 1 if the rate is contained in function1 then move to function2 and then pass the result to a new field call [COMPLETERATE]?
Any ideas would be greatly appreciated.
Bill
If Left(RATE, 2) = "YN" And Right(RATE, 1) = "1" Then
RateName = "Yeoman First Class"
ElseIf Left(RATE, 2) = "YN" And Right(RATE, 1) = "C" Then
RateName = "Chief Yeoman"
etc...
This goes on for all 75+ ratings in the Navy, so the procedure is very large. I've tried breaking it up into two functions but how can I call both of these functions at the same time. I.E., call function 1 if the rate is contained in function1 then move to function2 and then pass the result to a new field call [COMPLETERATE]?
Any ideas would be greatly appreciated.
Bill