I have a form (frmCampaignDetails) with a TabControl on it. It's for a campaign scheduling tool for a marketing company. The tab control is called tabJobs and has 5 pages, pgeEmail, pgeDisplay, pgeKeywords, pgeTextLinks and pgeSMS.
On each one is a subform, frmEmailJobs, frmDisplayJobs, etc. It lists different jobs that are part of the campaign. When each one load, it checks how many records are in each recordset and puts this value in a text box control (for example if there are 3 emails listed it will return '3' in the variable intCount and insert it into the box).
The next step I need is to rename the caption of the tab it's on, so pgeEmail has the caption 'Email(3)'. I've been all round the houses using code like
frmCampaignDetails!tabJobs.Pages("pgeEmail").Caption = "Email (" & intCount & ")"
But I just can't find the tabcontrol to refer to - I get 'object required' error messages. Does anyone know of a way?