Hi Forum,

I am new here....

I would like to programmatically set the record source of a subform on a tab....

some background info:
===================

a)i want the user to assign "tags" to queries to create a kind of index for which to search by tag for queries.

(Please be aware that these queries are created in an Oracle tool called discoverer.
I have realized a way to import all Oracle queries in an excel spreadsheet into Access to give the user a different
front door by which to execute these queries via a .bat file)

c) A straightforward use of tabbed forms is to spread out fields from THE SAME record across tabs for readability.

d) In my case, i want to have 4 tabs that represent DIFFERENT RECORDS
in the same table called TBL_Tag.

Because, i want the user to be able to create tags of 4 different flavors such as:
Search query by:
User
office Function
Field
Programmer technique

tab 0 = "User" - any records would be written to TBL_tag with key of 10
tab 1 = "Office Function" - any records would be written to TBL_tag with key of 20
tab 2 = "Field" - any records would be written to TBL_tag with key of 30
tab 3 = "Programmer" - any records would be written to TBL_tag with key of 40

e) when the user would click a tab, the tab has a tag property with
10,20,30, 40

f) each tab has the same subform

g) when user click the tab, would like the subform to filter or set its record
source for:



strWhereSql = " WHERE Tag_Type = " & Me.tabContainer.Pages(0).Tag & _
" AND " & _
" Tag_QueryName = " & varQuote(Me.txtHiddenQueryName)


I tried so many different ideas in the Tab's change event,
and am getting run time errors.

Below are screen shots and test mdb....

Please click FRM_001_MenuDiscoverer
The first query is already highlighted: aaa_DiscovererReports
so just click button: Assign Tags

that takes you to: FRM_015_QueryTag_Tab
with subform: sfrm_015_QueryTag
subform ctl : ctl_subf


any help you can provide would be greatly appreciated, tx, sandra