Show Value in Tab Page Subform control in Other Tab Ctrl Pg Sbfrm ctrl

Joined
Dec 10, 2008
Messages
5
Reaction score
0
I have a tab control with a number of pages. Each page contains most of that page's data in a subform. I want the user to be able to see displayed in a control on one of the tab pages, values already entered on another page of the same tab control. That is:

ControlA on subformA on tabcontrol1 page X =

ControlB on subformB on tabcontrol1 page Y

ControlA is in the header of subformA (I've tried moving it to the Detail section just to see of it would make a difference; it did not seem to)

I have tried innumerable combinations of code but each and every time receive this error:

2447 there is an invalid use of the . (dot) or ! operator or invalid parenthesis

Here is some of the code I've tried. The main form is frmClientInfoEnter.

In the Control Source of ControlA:
=[Parent]![subformB].[Form].[controlB]
or
=[Forms]![frmClientInfoEnter]![subformB].[Form].[controlB]
both of which, btw, produce the desired result (displaying the data in ControlB) but still throws error 2447

Any replacement of period for exclamation mark does not seem to work. Also: As I do not strictly speaking need any of the brackets I do not enter them; Access puts them all in automatically.

I have tried leaving ControlA unbound and setting its value using VBA code on the Current event of subformA, eg
Me.controlA = Forms!frmClientInfoEnter.subformB.Form.controlB
-- same thing: I get correct result but it throws the 2447 error.

Am I right in thinking the code I've tried SHOULD have worked?

I can't figure what I'm doing wrong. Any ideas?

ps: I have checked the References dialog and none are "MISSING." I have also refreshed the references; didn't make any difference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top