auto updating form values based on another table (2 Viewers)

potts

Registered User.
Local time
Today, 09:58
Joined
Jul 24, 2002
Messages
87
I have created a multi-table form to enter a number of details relating to the use of a facility on a given date. Each individual using the facility belongs to one of many groups. Each group is in effect a customer. As some of the customers receive a discount on the standard access rate, I want to automatically update the discount field in the session form - when an individual is entered into the session - based on the discount value stored in the customer table to which they belong.

Any ideas?
 

AlanS

Registered User.
Local time
Today, 05:58
Joined
Mar 23, 2001
Messages
292
Set up a query based on the Individual table joined to the Group table (I'm assuming that Group:Individual is a one-to-many relationship, i.e., each group may have zero, one or more individuals but each individual may belong to only one group). The query's output columns must include at least the individual's name and the discount amount/rate associated with the group to which they belong. On your form, created a combo box bound to that query. The combo box will display the individual's name (which will also be the bound column). Assuming that the discount amount/rate is in the second column of the combo box, you could refer to the discount amount/rate for the currently selected individual as MyComboBox.Column(1). In the AfterUpdate event procedure for the combo box, you can assign that value to your discount field.
 

Users who are viewing this thread

Top Bottom