Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    Irving, TX (Dallas, Fort Worth)
    Posts
    379

    Unanswered: Tabbed Subform Call

    All,

    Have a set of nested forms/subforms in this order:

    frmMain => sfmMain => ifmTABset => sfmUSR => sfmSETcfg

    where sfmMain & sfmUSR are the control fields containing the subforms being called and the TAB control TabCtl0 resides in the TABBED form of ifmTABset.

    I am trying to open the 5th TAB in the TABBED form and set it's subform with the following code:

    Code:
            Form_frmMain.sfmMain.Form![TabCtl0].Value = 5
    or
            Form_frmMain![sfmMain].Form.ifmTABset![TabCtl0].Value = 5
    
            Form_frmMain![sfmMain].Form.ifmTABset![sfmUSR].SourceObject = "sfmSETcfg"
            Form_frmMain![sfmMain].Form.ifmTABset![sfmUSR].SetFocus
    The last two lines are correct, but getting:
    1. "not valid for this property",
    2. "can't find field".
    errors respectively. If I put the last two line first and I click the TAB after clearing the error the right subform shows.

    I know it is a syntax thing, but my mind is toast today, so please help.

    Thanks!

    DBS4M
    Last edited by dbsupport4me; 04-20-09 at 19:08.

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Do you have any code in the OnChange event of TabCtl0 tab which could be conflicting? (or perhaps the onload/onopen event of the form?)
    Last edited by pkstormy; 04-20-09 at 19:53.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Feb 2004
    Location
    Irving, TX (Dallas, Fort Worth)
    Posts
    379

    Onchange

    Actually the part I am programming is just that.

    The customer DB is designed with FE/BE config with central BE DB on the server, so writing an automated table relink subroutine. Have global of "LinkStat" initialized as False, with:

    Code:
    if LinkStat = true then
    ....
    end if
    in each "OnLoad" event for each screen, which is necessary as all forms are unbound, so have to execute for .rowsource of each combobox in each form in the onload for each.

    When the link refresh runs, without error, the LinkStat is set True, but it is having trouble calling this config screen, where the user can "Browse" for the location of the BE file and sets it in a local table.

    The config screen is in the fifth TAB of the TABBED form (which is the set of "SETUP" screens) and the 3rd subform in the SETUP Form, normally selected with button on lefthand side, see the ConfigScreen screen shot. The initial run always fails to link, so a manual call to the subroutine is needed, which is from the button in the Tools Screen (5th subform) per screen shot.

    Does that help?

    DBS4M
    Attached Thumbnails Attached Thumbnails ConfigScreen.jpg   ToolsScreen.jpg  

  4. #4
    Join Date
    Feb 2004
    Location
    Irving, TX (Dallas, Fort Worth)
    Posts
    379

    Resolved

    All,

    Got this resolved.

    DBS4M

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •