Tab Ctrl

  • Thread starter Thread starter JohnLute
  • Start date Start date
J

JohnLute

I have a tab control on a form and need to update a control in a subform
that's located in the tab control. The following can't find the control:

And
[Forms]![frmFinishedGoods]![TabCtlFG]![sfrmFGPhysicalAttributes].[Form]![UnitCount] > 0 Then

I know that [TabCtlFG] is part of the problem. Does anyone know how I can
properly incorporate the tab control into the string?

THANKS!!!
 
Please disregard. I removed the tab control reference and now it works fine.
Previously, it wuoldn't work even without the reference. When I moved the
subform from the tab control and onto the main form it would work so I
figured that the tab control needed referenced. As I researched the forum
further I found claims that the control does NOT need referenced. I went back
and took out the reference and everything worked.

What's up with that? Anyway, all's well tonight!
 
I have a tab control on a form and need to update a control in a subform
that's located in the tab control. The following can't find the control:

And
[Forms]![frmFinishedGoods]![TabCtlFG]![sfrmFGPhysicalAttributes].[Form]![UnitCount] > 0 Then

I know that [TabCtlFG] is part of the problem. Does anyone know how I can
properly incorporate the tab control into the string?

You don't.

The tab control has no effect on control references. The controls on a
tab page are - logically - just controls on the form; the tab control
only affects their position on the screen, not their logical
relationship.

Use

[Forms]![frmFinishedGoods]![sfrmFGPhysicalAttributes].[Form]![UnitCount]

instead.
 
Thanks, John. You must've missed my disregard post. Sorry for the trouble!

Very peculiar why the code wasn't working initially but worked when I moved
the subform from the tab control to the main form. When I moved the subform
back to the tab control then the code failed again. Really odd but it's all
good now.

Thanks!

--
www.Marzetti.com


John W. Vinson/MVP said:
I have a tab control on a form and need to update a control in a subform
that's located in the tab control. The following can't find the control:

And
[Forms]![frmFinishedGoods]![TabCtlFG]![sfrmFGPhysicalAttributes].[Form]![UnitCount] > 0 Then

I know that [TabCtlFG] is part of the problem. Does anyone know how I can
properly incorporate the tab control into the string?

You don't.

The tab control has no effect on control references. The controls on a
tab page are - logically - just controls on the form; the tab control
only affects their position on the screen, not their logical
relationship.

Use

[Forms]![frmFinishedGoods]![sfrmFGPhysicalAttributes].[Form]![UnitCount]

instead.
 
Back
Top