Filtering a drop down in a subform

cruzinonline

Registered User.
Local time
Today, 16:44
Joined
Jun 26, 2014
Messages
13
The main form has fields for Record ID, Position, and Revision. The subform has fields for ID, Position, and Revision. There is also a field for "task". I have over 15 positions and 495 tasks. Each position has a set number (around 15 or so) tasks associated with that position.

I have the Position in the main form and the subform linked so when I select a position on the main form, the subform loads the same position. The question field (drop down) is "fed" from a query which contains all positions and all tasks. What I want the subform to do is when I select a position the drop down ONLY displays the tasks associated with that position.

I tried using an event procedure "On Click" and "After Update" to no avail. The embedded macro was:
Apply Filter Where condition= [tbl_Detail Cost Information]![Position]=[qry_attempt 1]![Position].

I also tried the reverse Where condition =[qry_attempt 1]![Position]=[tbl_Detail Cost Information]![Position]

The result is a fully loaded (all tasks) drop down.
 
Here is the whole shooting match. The form that opens is the main data entry, the second tab is where I want to capture the detailed data. This is used for estimating jobs. The idea is, tab one captures basic information in a main table and tab 2 captures the detailed cost information in the detailed table.
 

Attachments

To answer your first question, they are two different tables. The first table is tbl_main data. This captures basic project information. The second table for the sub form is tbl_Detail Cost Information. I linked the ID from tbl_Main to CBI Record ID, Position in Main to Position in Detail, and Revision in Main to Revision in Detail.

The idea is you create the main record and then use the subform to create detailed cost records. By linking the ID with the Record number I can report out on the overall project, by linking the Position to Position, when I select position on the Main form it creates the Position Record on the sub form, and the Revision allows me to capture each revision and group seperately in the reports. This way I can track and trend history of the overall project.

The boggle is, the Task Description field. There are a lot of varied tasks that are specific to the Position and I would like to filter this list based on what position you select, either in the Main form or the sub form, whichever is easiest.
 

Users who are viewing this thread

Back
Top Bottom