I am trying to get the field value by formula by comparing 2 combo boxes. I am getting the 1st part right but the 2nd part.
Private Sub Convert_Rate_Unit_AfterUpdate()
If [Convert_Rate_Unit] = [Rate_Per_Unit] Then
[ConvertRate] = [Rate]
If [Convert_Rate_Unit] <> [Rate_Per_Unit] Then
[ConvertRate] = [Rate / 1000]
End If
End If
End Sub
It is the brackets you've got wrong:
Private Sub Convert_Rate_Unit_AfterUpdate()
If [Convert_Rate_Unit] = [Rate_Per_Unit] Then
[ConvertRate] = [Rate]
Else
[ConvertRate] = [Rate] / 1000
End If
End Sub