K
Keri
Hi I am trying to write a code using the if then statment. I am tracking
mileage costs for cars but I need to add a statement if the car was only used
for a number of days to get it charge the monthly fee right. Here is the
code that I'm using
Private Sub Monthly_Rental_BeforeUpdate(Cancel As Integer)
If Days < 30 Then
If IsNull(Me.Day_Rates) Then
Me.Day_Rates = Monnthly_Rental / Days
End If
End If
End Sub
Its not working proberly and I not sure what I'm doing wrong. Thank you.
mileage costs for cars but I need to add a statement if the car was only used
for a number of days to get it charge the monthly fee right. Here is the
code that I'm using
Private Sub Monthly_Rental_BeforeUpdate(Cancel As Integer)
If Days < 30 Then
If IsNull(Me.Day_Rates) Then
Me.Day_Rates = Monnthly_Rental / Days
End If
End If
End Sub
Its not working proberly and I not sure what I'm doing wrong. Thank you.