B
boba
Hi. I am having a problem. I have a main form (NewSampleRequest) with a
subform (SampleRequestItemsSubform) which handles the transactions for
the main form. Basically we have "Items" which need to be added to a
Sample Request, so I do this in a subform. However, these Items can
belong to multiple "Sets", so the user needs to be able to select a set
in the subform as well. So we created a query which narrows down the
list of available sets to drop down list to only those related records
in a table called "Transactions". Everything works perfectly if I do it
stand alone in the form "SampleRequestItemsSubform". However when I do
it as a subform, I get a Runtime Error 2450. Please advise how I can
fix the problem.
Here is the code for the two subform fields in question.
Item ID Field-After Update
Private Sub cmbSampleRequestItemItemID_AfterUpdate()
[Forms]![SampleRequestItemsSubform].Recalc
End Sub
Set ID field-Row Source
SELECT Transactions.SetID, Transactions.ItemID
FROM Transactions
WHERE
(((Transactions.ItemID)=[Forms]![SampleRequestItemsSubform]![SampleRequestItemItemID]));
Thank you.
subform (SampleRequestItemsSubform) which handles the transactions for
the main form. Basically we have "Items" which need to be added to a
Sample Request, so I do this in a subform. However, these Items can
belong to multiple "Sets", so the user needs to be able to select a set
in the subform as well. So we created a query which narrows down the
list of available sets to drop down list to only those related records
in a table called "Transactions". Everything works perfectly if I do it
stand alone in the form "SampleRequestItemsSubform". However when I do
it as a subform, I get a Runtime Error 2450. Please advise how I can
fix the problem.
Here is the code for the two subform fields in question.
Item ID Field-After Update
Private Sub cmbSampleRequestItemItemID_AfterUpdate()
[Forms]![SampleRequestItemsSubform].Recalc
End Sub
Set ID field-Row Source
SELECT Transactions.SetID, Transactions.ItemID
FROM Transactions
WHERE
(((Transactions.ItemID)=[Forms]![SampleRequestItemsSubform]![SampleRequestItemItemID]));
Thank you.