Hello All,
I am developing a continuous form for a timber yard, using Access 2016. The form manages pay rates for carriers of loads of timber products. There are three basic types of journeys these carriers can make: from a remote timber source to my client's yard; from my client's yard to a mill, and from a remote timber source to a mill.
The form's recordsource is a query based on a pricing table (tblPricing) that has a column (TypeTrip) that defines the kind of trip the record is for. The query has a WHERE clause that references a tempvar that is set in the AfterUpdate event of an option group whose choices are the three kinds of trips:
SELECT tblPricing.* FROM tblPricing WHERE (((tblPricing.TypeTrip)=[Tempvars]![TV_Pricing_TypeTrip]));
The idea is for the query to provide a fundamental filter for the records being presented on the form, based on the type of trip.
The AfterUpdate event of the option group also calls logic to set additional filters appropriate to to the TypeTrip, using the form's Filter property. The last line in the AfterUpdate event is Me.Requery. This should ensure that the basic set of records being presented belongs to the type of trip specified in the option group.
This works for TripTypes 1 and 2, but not for TypeTrip 3, Timber to Mill:
As you can see, for Timber to Mill the form presents TripType 2 records rather than TripType 3. If the form recordsource query is manually opened on its own while Timber to Mill is selected, it shows the correct records - none, because no Type 3 records are yet in the system.
Has anyone run into this phenomenon before? I don't know whether there is a gap in my education, the form is somehow corrupted, there is a bug in Access, or something else.
Thanks!
I am developing a continuous form for a timber yard, using Access 2016. The form manages pay rates for carriers of loads of timber products. There are three basic types of journeys these carriers can make: from a remote timber source to my client's yard; from my client's yard to a mill, and from a remote timber source to a mill.
The form's recordsource is a query based on a pricing table (tblPricing) that has a column (TypeTrip) that defines the kind of trip the record is for. The query has a WHERE clause that references a tempvar that is set in the AfterUpdate event of an option group whose choices are the three kinds of trips:
SELECT tblPricing.* FROM tblPricing WHERE (((tblPricing.TypeTrip)=[Tempvars]![TV_Pricing_TypeTrip]));
The idea is for the query to provide a fundamental filter for the records being presented on the form, based on the type of trip.
The AfterUpdate event of the option group also calls logic to set additional filters appropriate to to the TypeTrip, using the form's Filter property. The last line in the AfterUpdate event is Me.Requery. This should ensure that the basic set of records being presented belongs to the type of trip specified in the option group.
This works for TripTypes 1 and 2, but not for TypeTrip 3, Timber to Mill:
As you can see, for Timber to Mill the form presents TripType 2 records rather than TripType 3. If the form recordsource query is manually opened on its own while Timber to Mill is selected, it shows the correct records - none, because no Type 3 records are yet in the system.
Has anyone run into this phenomenon before? I don't know whether there is a gap in my education, the form is somehow corrupted, there is a bug in Access, or something else.
Thanks!