ms access - Change a tab's caption from the subform which sits on it -


i have form (frmcampaigndetails) tabcontrol on it. it's campaign scheduling tool marketing company. tab control called tabjobs , has 5 pages, pgeemail, pgedisplay, pgekeywords, pgetextlinks , pgesms.

on each 1 subform, frmemailjobs, frmdisplayjobs, etc. lists different jobs part of campaign. when each 1 load, checks how many records in each recordset , puts value in text box control (for example if there 3 emails listed return '3' in variable intcount , insert box).

the next step need rename caption of tab it's on, pgeemail has caption 'email(3)'. i've been round houses using code like

frmcampaigndetails!tabjobs.pages("pgeemail").caption = "email (" & intcount & ")" 

but can't find tabcontrol refer - 'object required' error messages. know of way?

your syntax valid, except missing initial forms! reference.

forms!frmcampaigndetails!tabjobs.pages("pgeemail").caption = "email (" & intcount & ")" 

should work.

or if it's called subform of frmcampaigndetails:

me.parent!tabjobs.pages("pgeemail").caption = "email (" & intcount & ")" 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -