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

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?

Replay

Category: ms access Time: 2016-07-28 Views: 0
Tags: ms access vba

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.100 (s). 12 q(s)