The code I have is this:
Select Case Me![Time]
Case #7:00:00 AM# To #8:49:59 AM#
If Duration = 15 Then
Cost = 33
ElseIf Duration = 30 Then
Cost = 55
ElseIf Duration = 45 Then
Cost = 77
ElseIf Duration = 60 Then
Cost = 93
Else
Duration = 0
Cost = 0
End If
and so on for other various time intervals.
I have a table called PRICE with Duration, Time, and Cost
I wrote a code using Select Case method for the Cost.
This cost is related to Duration and Time.
What I need to do is calculate the Cost for all RECORDS.
So for example (My Cost field is blank right now since I can't get this part to work)
Duration Time Cost
30 6:30:32 0
30 12:45:21 0
15 11:21:11 0
45 3:12:42 0
so on...
I need to calculate all fields......I have the code ready and I can update them ONE by ONE but not all at ONCE....is it possible to use Update Query in this situation?
any help would be appreciated. Thanks
Select Case Me![Time]
Case #7:00:00 AM# To #8:49:59 AM#
If Duration = 15 Then
Cost = 33
ElseIf Duration = 30 Then
Cost = 55
ElseIf Duration = 45 Then
Cost = 77
ElseIf Duration = 60 Then
Cost = 93
Else
Duration = 0
Cost = 0
End If
and so on for other various time intervals.
I have a table called PRICE with Duration, Time, and Cost
I wrote a code using Select Case method for the Cost.
This cost is related to Duration and Time.
What I need to do is calculate the Cost for all RECORDS.
So for example (My Cost field is blank right now since I can't get this part to work)
Duration Time Cost
30 6:30:32 0
30 12:45:21 0
15 11:21:11 0
45 3:12:42 0
so on...
I need to calculate all fields......I have the code ready and I can update them ONE by ONE but not all at ONCE....is it possible to use Update Query in this situation?
any help would be appreciated. Thanks