Selasa, 12 Juli 2011

[MS_AccessPros] Re: Access 2003: subform on tab control - how to set recordsource programmatically

 

Hi Sandra

I've moved your file to the Assistance Needed folder. I'll take a look at it if time permits.

Bill

--- In MS_Access_Professionals@yahoogroups.com, "happily613b" <mytfein@...> wrote:
>
> 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
>

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar