Private Function CalcQbasic()
90 INPUT "ref "; R$ <-- These should go on a form
100 INPUT "jet model "; jet We should give them "good" names
110 INPUT "rpm "; E
120 INPUT "head "; H We can put the inputs into a table, or at least use
130 INPUT "flow rate "; Q a form to enter them
131 INPUT "blade no. (3) "; J
132 INPUT "solidity (1.0) "; F
133 INPUT "imp.effy. (.88) "; G
135 K = 0.975 <-- "Universal constant" Let's give it a meaningful name
220 If jet = 901 Then GoTo 314
223 If jet = 90 Then GoTo 330
250 GoTo 540
314 DR = 3.81 <-- Each set of these constants should have a real name
315 DT = 9.437 We'll populate them with a Case statement
316 AR = 0.445
317 AT = 0.1309
318 DB = 5.8
319 DW = 10
320 HR = 2.11
321 HT = 2.33
322 GoTo 590
330 DR = 3.5 <-- Other half of the Case statement
340 DT = 9.405
350 AR = 0.384
360 AT = 0.1309
370 DB = 5
380 DW = 10
381 HR = 2.16
382 HT = 2.45
383 GoTo 590
590 ard = AR * 57.3 <-- These "dynamic" guys should have real names
591 atd = AT * 57.3 Now that we can give longer names
595 U = 4
598 A50 = (AR + 2 * AT) / 3 <-- This stuff will convert easily, but it would be
600 AO = A50 nice to give them "real" names too
605 UR = U / Cos(AR - A50) * 1.05
610 a = DR - UR * Sin(AR) All of the Math can convert easily
620 c = DR + UR * Sin(AR)
635 UT = U / Cos(A50 - AT) * 0.96
640 B = DT - UT * Sin(AT)
645 d = DT + UT * Sin(AT)
650 P = Q * 4 * Cos(A50) / (B - a) / (B + a) / 3.1416 * 144 / K
655 R = Q * 4 * Cos(A50) / (d - c) / (d + c) / 3.1416 * 144 / K
660 O = 0.5
662 HB = HT + UT / 2 * Cos(AT)
664 HD = HT - UT / 2 * Cos(AT)
666 HA = HR + UR / 2 * Cos(AR)
668 HC = HR - UR / 2 * Cos(AR)
670 L50 = ((B ^ 2 - a ^ 2) * 0.5 + a ^ 2) ^ 0.5
672 M50 = ((d ^ 2 - c ^ 2) * 0.5 + c ^ 2) ^ 0.5
674 HI50 = (L50 - a) / (B - a) * (HB - HA) + HA
676 HE50 = (M50 - c) / (d - c) * (HD - HC) + HC
678 A50 = Atn((M50 - L50) / 2 / (HI50 - HE50))
680 L10 = ((B ^ 2 - a ^ 2) * 0.1 + a ^ 2) ^ 0.5 / 12
685 M10 = ((d ^ 2 - c ^ 2) * 0.1 + c ^ 2) ^ 0.5 / 12
690 A10 = Atn(((L - L10) - (M - M10)) * 6 / Cos(A50) / U) + A50
700 DX = ((DT ^ 2 - DR ^ 2) * O + DR ^ 2) ^ 0.5
705 L = (DX - U * Sin(AO)) / 12
710 M = (DX + U * Sin(AO)) / 12
715 N = E * 3.1416 / 60 * L
720 S = Atn(P / N)
730 U = 12 * (L + M) / 2 * 3.1416 / J * F * Tan((S + T) / 2)
740 V = (1 + 1.25 * Sin(T)) * M * L * 12 / J / U / (M + L)
750 W = 32.2 * H / G / E * 19.1 / ((c ^ 2 + d ^ 2) / 2) ^ 0.5 * 12
760 X = (V + 1) * W
770 Y = Atn(R / (N * M / L - X))
772 If Y < 0 Then Y = 1.5
794 HO = (DX - DR) / (DT - DR) * (HT - HR) + HR
795 HI = HO + U / 2 * Cos(AO)
796 HE = HO - U / 2 * Cos(AO)
800 Z = Atn(W / R)
805 If Y > T + 0.001 Then GoTo 900
806 If Y < T - 0.001 Then GoTo 900
810 If O = 0.5 Then GoTo 990
812 MA = (S + T) * 57.3 / 2
814 CA = (T - S) * 57.3
'
' Now that we're not restricted to the QBASIC interface, should the results go into
' a table, on the form, or on a report ...
'
820 Y$ = "##.## ###.## ###.## ###.## ###.## ###.## ###.## ###.## ###.## ###.## ###.## "
825 Print USING; Y$; O; L * 12; M * 12; S * 57.3; T * 57.3; U; V; HI; HE; MA; CA
840 If O = 0.5 Then GoTo 842 Else GoTo 860
842 O = 0
844 AO = AR
850 GoTo 700
860 If O = 0 Then GoTo 862 Else GoTo 880
862 O = 0.1
864 AO = A10
870 GoTo 700
880 If O = 0.1 Then GoTo 882 Else GoTo 980
882 O = 1
884 AO = AT
890 GoTo 700
900 T = Y
960 If O = 0.5 Then GoTo 600
970 GoTo 700
980 If c > DB Then LPRINT "zero line outside boss diameter"
982 If d > DW Then LPRINT "tip line outside wear ring"
984 If Y = 1.5 Then LPRINT "angles suspect"
989 End
'
' See above note about the output
'
990 Print "blade number "; J
1010 Print "solidity "; F
1030 Print "impeller efficiency "; G
1050 Print "blockage factor % "; KB
1090 Print "mid dia root ins "; DR
1097 Print "mid height root ins "; HR
1100 Print "mid dia tip ins "; DT
1107 Print "mid height tip ins "; HT
1110 Print "taper angle boss "; ard
1116 Print "taper angle 10% line "; A10 * 57.3
1118 Print "taper angle 50% line "; A50 * 57.3
1120 Print "taper angle tip "; atd
1130 Print "max dia boss ins "; DB
1140 Print "max dia wear ring ins "; DW
1150 Print "Cu3 "; W
1170 Print "stator inlet angle "; Z * 57.3
1190 Print "area d.in d.out b1 b2 bl len cp ht.in ht.out MnAngl camber "
1210 GoTo 812
End Function
See if this works. In theory it has been converted to Access2002/2003. Please be aware that I was doing this to learn Access2007. Consequently, it is not a full solution. I hope what I have done can serve as examples of how to finish what you want. Basically you will need to create additional input boxes and import all your formulas. I made-up imaginary formulas/values, since I had no idea what the real ones did. I hope that this is still useful for you.Sorry only using Access 2003 so cannot open your file.