MontgomeryPete
Instructor
I need to update a table with a unique fare each time a reservation is taken. The user is working in a sub form (data source: Table Ride). The fare calculation is somewhat complicated, so an update with a combo box is not appropriate. Fares are $2, $4 and $6, depending on the qualifications of the passenger and the travel destination.
I calculate the fare with a SELECT statement as follows:
I then want to update the field Ride.Fare, in the same sequence, as follows:
Obviously, I’m really tangled up with the proper procedures here. Can any one point the way?
Thanks, Pete
I calculate the fare with a SELECT statement as follows:
Code:
SELECT Ride.RideNo,Passenger.ADAExpirDate , Ride.PickUpFareZone,Ride.DropOffFareZone, Locations_1.DispatchZone, Locations.DispatchZone,
IIf([ADAExpirDate]>Date(),IIf([Locations_1.DispatchZone]=1 And [Locations.DispatchZone]=1,2,4),6) AS RideFare;
Code:
UPDATE Ride SET Fare = RideFare, WHERE Ride.RideNo = [Forms]![frmSubscriptionRideDetail]![RideNo]
Thanks, Pete