Hello , I have this code and it applies on one record when click on a command button in a form.
If (Me.pH.Value < 7.15) Then
Me.pH_ApII.Value = 4
ElseIf (Me.pH.Value < 7.25) Then
Me.pH_ApII.Value = 3
ElseIf (Me.pH.Value < 7.32) Then
Me.pH_ApII.Value = 1
ElseIf (Me.pH.Value < 7.49) Then
Me.pH_ApII.Value = 0
ElseIf (Me.pH.Value >= 7.5) Then
Me.pH_ApII.Value = 3
ElseIf (Me.pH.Value > 7.7) Then
Me.pH_ApII.Value = 4
End If
Several records are entered from another form and I have to apply the code individually in each record to obtain the results.
It doesn't work with OnOpen Form or AfterUpDate record to make the calculation.
Is there another way that automatically applies the code to all records?
Or even make this calculations in a query?
Thank you very much.
If (Me.pH.Value < 7.15) Then
Me.pH_ApII.Value = 4
ElseIf (Me.pH.Value < 7.25) Then
Me.pH_ApII.Value = 3
ElseIf (Me.pH.Value < 7.32) Then
Me.pH_ApII.Value = 1
ElseIf (Me.pH.Value < 7.49) Then
Me.pH_ApII.Value = 0
ElseIf (Me.pH.Value >= 7.5) Then
Me.pH_ApII.Value = 3
ElseIf (Me.pH.Value > 7.7) Then
Me.pH_ApII.Value = 4
End If
Several records are entered from another form and I have to apply the code individually in each record to obtain the results.
It doesn't work with OnOpen Form or AfterUpDate record to make the calculation.
Is there another way that automatically applies the code to all records?
Or even make this calculations in a query?
Thank you very much.