Kruger_jjp
New member
- Local time
- Today, 12:18
- Joined
- Sep 23, 2011
- Messages
- 7
I have a one form that I use. On the form I have 7 diffrent fields that data can be put in. At the right hand site I have a Total Credits field that I want to change as the other fields change. Let me explain more this is to capture how many units of credit (pre-paid phone time was given to a person). So the field I have for example are Roshan 500; AWCC 500. If I put 2 for example in the Roshan field and one in the AWCC field. The total should show 1500. I also have this code on "change" for each field, as I want to enter the amount of scratch cards and not the amount of credits.
Private Sub AWCC_500_Change()
If AWCC_500 > 0 Then
AWCC5 = AWCC_500 * 500
Else
AWCC5 = 0
End If
End Sub
Private Sub Etisalat_500_Change()
Dim E5 As Integer
If Etisalat_500 > 0 Then
E5 = Roshan_500 * 500
Else
E5 = 0
End If
End Sub
In the Credits total field I want to add AWCC5 and E5 together.
I declared the variables as follows:-
Public AWCC5 As Integer
Public R5 As Integer
Private Sub AWCC_500_Change()
If AWCC_500 > 0 Then
AWCC5 = AWCC_500 * 500
Else
AWCC5 = 0
End If
End Sub
Private Sub Etisalat_500_Change()
Dim E5 As Integer
If Etisalat_500 > 0 Then
E5 = Roshan_500 * 500
Else
E5 = 0
End If
End Sub
In the Credits total field I want to add AWCC5 and E5 together.
I declared the variables as follows:-
Public AWCC5 As Integer
Public R5 As Integer