G
Guest
I can't figure out how to take data from my main form and use it to populate
a field in the subform. The main form is the ServiceAgreeement table and the
subform is the ServicesbyServiceAgreement. What I want to to is pick a price
group in the main form and either "A", "B", or "C" as the Price Schedule
(this is not a linked field, just a drop down list of "A", "B", or "C").
Then I want to pick a Service in the Subform, have it look at the price group
table and based on the service entered and the price group and price schedule
picked in the main form, populate the unit price in the subform. Tables are
listed below. Thanks for your help
Tables:
SERVICEAGREEMENT
ServiceAgreementID (PK)
PriceGroupID (FK to PRICEGROUPS)
PriceSchedule (list box of A, B, C)
SERVICESBYSERVICEAGREEMENT
ServiceAgreeementID (FK to SERVICEAGREEMENT)
ServiceCode (FK to Services)
Unit Price
PRICEGROUPS
PriceGroupID (PK)
PriceGroupDescr
PRICES
PriceGroupID (FK to PRICEGROUPS)
ServiceCode (FK to Services)
PriceSchedA
PriceSchedB
PriceSchedC
SERVICES
ServiceCode (PK)
ServiceDesc
a field in the subform. The main form is the ServiceAgreeement table and the
subform is the ServicesbyServiceAgreement. What I want to to is pick a price
group in the main form and either "A", "B", or "C" as the Price Schedule
(this is not a linked field, just a drop down list of "A", "B", or "C").
Then I want to pick a Service in the Subform, have it look at the price group
table and based on the service entered and the price group and price schedule
picked in the main form, populate the unit price in the subform. Tables are
listed below. Thanks for your help
Tables:
SERVICEAGREEMENT
ServiceAgreementID (PK)
PriceGroupID (FK to PRICEGROUPS)
PriceSchedule (list box of A, B, C)
SERVICESBYSERVICEAGREEMENT
ServiceAgreeementID (FK to SERVICEAGREEMENT)
ServiceCode (FK to Services)
Unit Price
PRICEGROUPS
PriceGroupID (PK)
PriceGroupDescr
PRICES
PriceGroupID (FK to PRICEGROUPS)
ServiceCode (FK to Services)
PriceSchedA
PriceSchedB
PriceSchedC
SERVICES
ServiceCode (PK)
ServiceDesc