jetersauce
Registered User.
- Local time
- Today, 02:15
- Joined
- Dec 21, 2010
- Messages
- 20
I'm having a problem with a subform that will not requery.
The subform is a datasheet that pulls price records based on a combo box in the main form. The query for the subform is as follows
I then have the following VB code for the CustomerID combo box
Selecting a CustomerID in the combo box will not cause the subform to populate the price data on its own.
HOWEVER, if I save a new price record under a CustomerID and THEN select that customer from the combo box, it pulls the query like it should. This is a problem because employees need to see the list of test prices per CustomerID without having to save a bogus record in order to have the query work.
Any help with this would be greatly appreciated.
The subform is a datasheet that pulls price records based on a combo box in the main form. The query for the subform is as follows
Code:
SELECT AFL_CustomerPrices.Matrix, AFL_CustomerPrices.Test, AFL_CustomerPrices.Method, AFL_CustomerPrices.Priority, AFL_CustomerPrices.Price, AFL_CustomerPrices.CustomerID
FROM AFL_CustomerPrices
WHERE (((AFL_CustomerPrices.CustomerID)=[Forms]![AFL_CustomerPrice]![cboCustomerID]));
I then have the following VB code for the CustomerID combo box
Code:
Private Sub cboCustomerID_AfterUpdate()
Me.AFL_CustomerPrice_subform.Form.Requery
End Sub
Selecting a CustomerID in the combo box will not cause the subform to populate the price data on its own.
HOWEVER, if I save a new price record under a CustomerID and THEN select that customer from the combo box, it pulls the query like it should. This is a problem because employees need to see the list of test prices per CustomerID without having to save a bogus record in order to have the query work.
Any help with this would be greatly appreciated.