natesternberg
Registered User.
- Local time
- Today, 00:09
- Joined
- Mar 3, 2011
- Messages
- 11
This is probably simple, but I seem to be stuck...
I have a form that displays data like this (based on a query):
VehicleType is a combo box, so the user can select one of the two values from within the form. I want a "total" text box in the footer that displays the sum of total cost of cars and the toal cost for trucks, and that updates as the user changes VehicleType.
It's the "as the user changes" part I'm having trouble with. I have the total set to a DSUM, and that gives the correct result, but only when the form first opens: it doesn't update as users change VehicleType.
So I tried adding an event handler to Cost.AfterUpdate that called tbTotal.Requery. That didn't do it either.
Any advice?
I have a form that displays data like this (based on a query):
Code:
[FONT=Courier New]Description VehicleType Cost[/FONT]
[FONT=Courier New]F150 TRUCK $100[/FONT]
[FONT=Courier New]Miata CAR $80[/FONT]
[FONT=Courier New]Taurus CAR $70[/FONT]
VehicleType is a combo box, so the user can select one of the two values from within the form. I want a "total" text box in the footer that displays the sum of total cost of cars and the toal cost for trucks, and that updates as the user changes VehicleType.
It's the "as the user changes" part I'm having trouble with. I have the total set to a DSUM, and that gives the correct result, but only when the form first opens: it doesn't update as users change VehicleType.
So I tried adding an event handler to Cost.AfterUpdate that called tbTotal.Requery. That didn't do it either.
Any advice?