Selasa, 12 Juli 2011

[MS_AccessPros] Fw: Access 2003: subform on a tab control

 



----- Forwarded Message -----
From: Sandra Feinzeig <happily613b@yahoo.com>
To: "ms_access_professionals@yahoogroups.com" <ms_access_professionals@yahoogroups.com>
Sent: Tuesday, July 12, 2011 11:38 AM
Subject: Access 2003: subform on a tab control

Hi Everyone,
 
Hope all is well.... it's been a while since i posted a question.......
 
I would like to programmatically set the record source of a subform on a tab....

I am very new to tabbed form and referring to controls 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 programmatic way to export all Oracle query names in an excel spreadsheet
             then i import the 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 types
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) i assigned to each tab 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 the tag rows that match the query name and the tag property from step (e)
 
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.
 
Just uploaded a test mdb in a zip file called Sandra's file  - subform on tab control..
 
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

The first tab needs to filter just to show jsmith, instead the tab is showing all record types for this query
name.  
 
any help you can provide would be greatly appreciated, tx, sandra

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar