Show records not used in combo box on continuous subform.

hzeigler4

Registered User.
Local time
Today, 15:53
Joined
Apr 18, 2007
Messages
42
I have a Main form frmEditWO that contains the subform subfrmWOStep. A user will select an existing Workorder. Then they have the option to Add a step used by clicking on the "Add a Step" buttun. This opens a regular form frmNewWOStep and brings the Work Order ID with it. The user then selects which step they would like to add. Here is what I want...

If the user has already entered a step(lets say Step 50), th smbStep combo box on frmNewWOStep should not have Step 50. The user can only add steps that have not already been used on a work order. Anyone have any ideas? I am attaching the database so you can view the forms.
 

Attachments

Haven't looked at the sample, but generally:

SELECT Step
FROM StepTable
WHERE Step Not In(
SELECT Step FROM OrderTable)

I'm sure you'd have to add some criteria to account for multiple work orders, but that's the concept.
 

Users who are viewing this thread

Back
Top Bottom