Tab Controls - Microsoft Community


i having issues tab control.  have main form kind of on switchboard type design. user clicks on button labeled "t&c analyst view."  clicking on button opens form called "frmtcanalyst" with tab control on form , on pages of tab control separate subforms open each page clicked on.  problem having when click "t&c analyst view" button, opens t&c analyst form on new vms jo's page nothing displays in subform called  frmtcanalystsuball1 unless click on other pages , come new vms jo's page.  wondering might need subform to load when user clicks on the "t&c analyst view" button.  code using tab control enough to ensure query relating particular page loaded upon loading frmtcanalyst not have 4-5 different queries running each page on tab control?  appreciate far expert in access.    

below code on click event for command button on switchboard labeled "t&c analyst view" 

private sub command32_click()
on error goto err_command32_click

    dim stdocname string
    dim stlinkcriteria string

    stdocname = "frmtcanalyst"
    docmd.openform stdocname, , , stlinkcriteria

exit_command32_click:
    exit sub

below code change event on tab control:

private sub tabctl1_change()
 
  select case tabctl1.pages.item(tabctl1.value).name
  
    case "my new vms jo's"
      if len(frmtcanalystsub1.sourceobject) = 0 then
      frmtcanalystsub1.sourceobject = "frmtcanalystsub"
        frmtcanalystsub1.linkchildfields = "frmtcanalyst"
      end if
   
    case "all new vms jo's"
      if len(frmtcanalystsuball1.sourceobject) = 0 then
        frmtcanalystsuball1.sourceobject = "frmtcanalystsuball"
        frmtcanalystsuball1.linkchildfields = "frmtcanalyst"
      end if
   
    case "my rate changes"
      if len(frmtcratechanges1.sourceobject) = 0 then
        frmtcratechanges1.sourceobject = "frmtcratechanges"
        frmtcratechanges1.linkchildfields = "frmtcanalyst"
      end if
     
    case "all rate changes"
      if len(frmtcratechangesall1.sourceobject) = 0 then
        frmtcratechangesall1.sourceobject = "frmtcratechangesall"
        frmtcratechangesall1.linkchildfields = "frmtcanalyst"
      end if
     
  end select

end sub

thanks,

terry

     

hi llorrac1 ,

updates?

regrads,
linda


Office / Access / Windows 10 / Office 365 for business



Comments

Popular posts from this blog

Getting ErrorCode: 120018 when trying to access Microsoft account - Microsoft Community

The message was sent to a distribution list ‎(DL)‎ - Microsoft Community

Activation Error 0x8004FE93 - Microsoft Community