Hi there,
I certainly can use some help here. Pls let me know if any of you had this problem and how u solved it.. a big thanks comes your way.
We have this huge questionaire of containing over 400 questions and the answers for some depend on cumultive totals of afew and likewise.
I have this humungous procedure that contains all of this code for teh questionnaire. When i use the form to enter data , it comes up with a compile error of PROCEDURE TOO LARGE.
Is there some way i can split the procedure into 2 and use it in one form without disturbing the logic. I know that the compiled state cannot exceed 64K.. this is the problem. All of the calcs refer to this one psycholgical form that passes answers from one field to another.
I will paste some of the code here so u can understand what i mean.. any help is appreciated.
Usha
PS: here is some of the code
This is the subform module t24 which contains a lot of these calls:
Private Sub T24_1_AfterUpdate()
Call calctemp24
End Sub
Private Sub T24_10_AfterUpdate()
Call calctemp24
End Sub
Private Sub T24_100_AfterUpdate()
Call calctemp24
End Sub
.................. and more like this
And here is calcemp24
Public Function calctemp24()
counter1 = 0
counter2 = 0
counter3 = 0
counter4 = 0
counter5 = 0
counter6 = 0
counter7 = 0
counter8 = 0
counter9 = 0
counter10 = 0
counter11 = 0
counter12 = 0
counter13 = 0
counter14 = 0
counter15 = 0
counter16 = 0
counter17 = 0
counter18 = 0
counter19 = 0
counter20 = 0
counter21 = 0
counter22 = 0
counter23 = 0
counter24 = 0
counter25 = 0
counter26 = 0
If frm!T24_7 = 888 Then counter1 = counter1 + 1
If frm!T24_7 = 999 Then counter2 = counter2 + 1
If frm!T24_33 = 888 Then counter1 = counter1 + 1
If frm!T24_33 = 999 Then counter2 = counter2 + 1
If frm!T24_38 = 888 Then counter1 = counter1 + 1
If frm!T24_38 = 999 Then counter2 = counter2 + 1
If frm!T24_40 = 888 Then counter1 = counter1 + 1
If frm!T24_40 = 999 Then counter2 = counter2 + 1
If frm!T24_41 = 888 Then counter1 = counter1 + 1
If frm!T24_41 = 999 Then counter2 = counter2 + 1
If frm!T24_44 = 888 Then counter1 = counter1 + 1
If frm!T24_44 = 999 Then counter2 = counter2 + 1
If frm!T24_82 = 888 Then counter1 = counter1 + 1
If frm!T24_82 = 999 Then counter2 = counter2 + 1
If frm!T24_107 = 1 Then frm!T24_107R = 7
If frm!T24_107 = 2 Then frm!T24_107R = 6
If frm!T24_107 = 3 Then frm!T24_107R = 5
If frm!T24_107 = 4 Then frm!T24_107R = 4
If frm!T24_107 = 5 Then frm!T24_107R = 3
If frm!T24_107 = 6 Then frm!T24_107R = 2
If frm!T24_107 = 7 Then frm!T24_107R = 1
If frm!T24_107 = 888 Then frm!T24_107R = 888
If frm!T24_107 = 999 Then frm!T24_107R = 999
If frm!T24_107R = 888 Then counter1 = counter1 + 1
If frm!T24_107R = 999 Then counter2 = counter2 + 1
If frm!T24_111 = 888 Then counter1 = counter1 + 1
If frm!T24_111 = 999 Then counter2 = counter2 + 1
...
and end part of the module is this
frm!T24ctant = counter2
frm!T24ctfoc = counter4
frm!T24ctshf = counter6
frm!T24ctdis = counter8
frm!T24cthi = counter10
frm!T24ctinh = counter12
frm!T24ct999 = counter2 + counter4 + counter6 + counter8 + counter10 + counter12 + counter14 + counter16 + counter18 + counter20 + counter22 + counter24 + counter26
End Function
this is only part of the code..
please let me know if there is a way i can break up this module into two or three small ones at the same time be able to use the answers/calcs from first one in the second module and from the second one in the third.. the final stats that come from all these three modules will be the assessed values for one client..
thanks a million in advance
usha
I certainly can use some help here. Pls let me know if any of you had this problem and how u solved it.. a big thanks comes your way.
We have this huge questionaire of containing over 400 questions and the answers for some depend on cumultive totals of afew and likewise.
I have this humungous procedure that contains all of this code for teh questionnaire. When i use the form to enter data , it comes up with a compile error of PROCEDURE TOO LARGE.
Is there some way i can split the procedure into 2 and use it in one form without disturbing the logic. I know that the compiled state cannot exceed 64K.. this is the problem. All of the calcs refer to this one psycholgical form that passes answers from one field to another.
I will paste some of the code here so u can understand what i mean.. any help is appreciated.
Usha
PS: here is some of the code
This is the subform module t24 which contains a lot of these calls:
Private Sub T24_1_AfterUpdate()
Call calctemp24
End Sub
Private Sub T24_10_AfterUpdate()
Call calctemp24
End Sub
Private Sub T24_100_AfterUpdate()
Call calctemp24
End Sub
.................. and more like this
And here is calcemp24
Public Function calctemp24()
counter1 = 0
counter2 = 0
counter3 = 0
counter4 = 0
counter5 = 0
counter6 = 0
counter7 = 0
counter8 = 0
counter9 = 0
counter10 = 0
counter11 = 0
counter12 = 0
counter13 = 0
counter14 = 0
counter15 = 0
counter16 = 0
counter17 = 0
counter18 = 0
counter19 = 0
counter20 = 0
counter21 = 0
counter22 = 0
counter23 = 0
counter24 = 0
counter25 = 0
counter26 = 0
If frm!T24_7 = 888 Then counter1 = counter1 + 1
If frm!T24_7 = 999 Then counter2 = counter2 + 1
If frm!T24_33 = 888 Then counter1 = counter1 + 1
If frm!T24_33 = 999 Then counter2 = counter2 + 1
If frm!T24_38 = 888 Then counter1 = counter1 + 1
If frm!T24_38 = 999 Then counter2 = counter2 + 1
If frm!T24_40 = 888 Then counter1 = counter1 + 1
If frm!T24_40 = 999 Then counter2 = counter2 + 1
If frm!T24_41 = 888 Then counter1 = counter1 + 1
If frm!T24_41 = 999 Then counter2 = counter2 + 1
If frm!T24_44 = 888 Then counter1 = counter1 + 1
If frm!T24_44 = 999 Then counter2 = counter2 + 1
If frm!T24_82 = 888 Then counter1 = counter1 + 1
If frm!T24_82 = 999 Then counter2 = counter2 + 1
If frm!T24_107 = 1 Then frm!T24_107R = 7
If frm!T24_107 = 2 Then frm!T24_107R = 6
If frm!T24_107 = 3 Then frm!T24_107R = 5
If frm!T24_107 = 4 Then frm!T24_107R = 4
If frm!T24_107 = 5 Then frm!T24_107R = 3
If frm!T24_107 = 6 Then frm!T24_107R = 2
If frm!T24_107 = 7 Then frm!T24_107R = 1
If frm!T24_107 = 888 Then frm!T24_107R = 888
If frm!T24_107 = 999 Then frm!T24_107R = 999
If frm!T24_107R = 888 Then counter1 = counter1 + 1
If frm!T24_107R = 999 Then counter2 = counter2 + 1
If frm!T24_111 = 888 Then counter1 = counter1 + 1
If frm!T24_111 = 999 Then counter2 = counter2 + 1
...
and end part of the module is this
frm!T24ctant = counter2
frm!T24ctfoc = counter4
frm!T24ctshf = counter6
frm!T24ctdis = counter8
frm!T24cthi = counter10
frm!T24ctinh = counter12
frm!T24ct999 = counter2 + counter4 + counter6 + counter8 + counter10 + counter12 + counter14 + counter16 + counter18 + counter20 + counter22 + counter24 + counter26
End Function
this is only part of the code..
please let me know if there is a way i can break up this module into two or three small ones at the same time be able to use the answers/calcs from first one in the second module and from the second one in the third.. the final stats that come from all these three modules will be the assessed values for one client..
thanks a million in advance
usha