Looping problems

  • Thread starter Thread starter marco_pb via AccessMonster.com
  • Start date Start date
M

marco_pb via AccessMonster.com

Hi all,
I really need your help now.. I have got form with tabular view.

I generate the code below and test it, what is happened is that the form only
count the val for the first row only.
I think I should use LOOP, but I don't know how..

I am a noob in using Access 2003.
=======================================================

Private Sub Form_Activate()

Dim Avg As Double
Dim P As Double
Dim TE As Double
Dim I As Double
Dim M As Double
Dim D As Double
Dim E As Double
Dim BA As String
Dim Val As Double

P = Forms![EGS - Schull Abschluss].[Physik].Value
TE = Forms![EGS - Schull Abschluss].[Technik_Elektronik].Value
I = Forms![EGS - Schull Abschluss].[Informatik].Value
M = Forms![EGS - Schull Abschluss].[Mathe].Value
D = Forms![EGS - Schull Abschluss].[Deutsch].Value
E = Forms![EGS - Schull Abschluss].[Englisch].Value
BA = Forms![EGS - Schull Abschluss].[Bildungsgangaktuell]
Val = Forms![EGS - Schull Abschluss].[Durchschnitt_Schulnote].Value

Avg = (P + TE + I + M + D + E) / 6
Val = Avg

If (BA = HS) Then
Val = Val * 1.2
Else
If (BA = GYM) Then
Val = Val * 0.8
Else
If (BA = FOS) Then
Val = Val * 0.8
Else
If (BA = ABI) Then
Val = Val * 0.67
End If
End If
End If
End If
End sub

THANK YOU IN ADVANCE...
 
thanks to all who view this..

I have already got the problem solved. thank you.
 
Back
Top