Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

filtering w/ another tables data

Status
Not open for further replies.
Sep 6, 2007
11
US
Is there a way to have data stored in a table and reference it in unlinked queries and tables to use for filtration?
 
adding a bit more detail: i have 3 tables which are all linked in various ways. two of the table have data in them that are year specific. wheres as the one is just a large repository of contact information. i have setup a fourth table (Working_Year) w/ a single field in it (selected_year) that is changed by the user via a drop down box on my first form. once the user selects the year of the data they want to work w/, all of the other forms and reports will reference the Working_Year.selected_year field to filter the data presented. the problem i am having is that the Working_Year table is not linkable to the others... there is only one field in it which changes. am i able to take this data and bring it into a form or report if it's not linked and use it as the filter?
 
If the user select/enters a year, wouldn't this value be part of the recordsource for the form or report.

If you put the users data into your 4 th table, wouldn't your query (recordsource look something like...
Code:
Select stuff from Tbl1..tBL2..
WHERE 
yearFld_inLinked_tables = (SELECT UserDate from Tbl4)

Could you then test the user supplied value and create the SQL for the query and set me.recordsource = newQuery
 
the user selects the year from a dropdown box on the very first form, a few forms back before printing a report or entering the data.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top