Re: Refresh certain txtboxes on a page with Form referenes
- From: "Mr. Smith" <nospam@xxxxxxxxxx>
- Date: Thu, 10 Apr 2008 11:06:36 +0200
Thanks Graham
Nice approaches (and yes, it's a "tab control")
What I did was to use the "tag" properties on the text boxes I needed to
update, I've used tag arrays with success previously.
My text boxes has tag values as arrays in this way a|r|...|...|...
a = all users can view this text boxes
r = requery this text box when Tab_change occurs
Tanks for your time Graham.
Kind regards
Mr. Smith
"Graham Mandeno" <Graham.Mandeno@xxxxxxxxxxxxx> wrote in message
news:86304060-A053-4CD1-8A93-165469F91ADB@xxxxxxxxxxxxxxxx
Hello Mr. Smith
I assume you mean a "tab control", not a "page object"?
First, does the subform on page 1 need to be a subform? It would be
simpler just to place the textboxes for the consolidated information
directly onto the tab control page. Then the control source for your
textbox does not need to reference the Forms collection:
=sub_frm_revenue_pg2!txt_totalrevenue_a
Secondly, it occurs to me that page 1 is invisible while you are updating
the subforms on the other pages, so you really only need to refresh the
content of page 1 when that page is selected. For this you can use the
tab control's Change event:
Private Sub tbcPages_Change()
If tbcPages = 0 Then
<refresh the subform/textboxes as necessary>
End If
End Sub
To refresh the textbox, or an entire subform, use the Refresh method:
txt_totalRevenue_pg2.Requery
or
sub_frm_pg1.Requery
--
Good Luck :-)
Graham Mandeno [Access MVP]
Auckland, New Zealand
"Mr. Smith" <nospam@xxxxxxxxxx> wrote in message
news:OiiUqojmIHA.5080@xxxxxxxxxxxxxxxxxxxxxxx
Hi.
(Access 03)
I have a form with a page object. The page object has some 8 pages. Each
page has a sub form. I've linked some of the textboxes on the first page
to be able to have consolidated information as the first of the 8 pages.
A text box in a sub form on the first page has a reference like this, to
a text box in the sub form on page 2.
=Forms!sub_frm_revenue_pg2!txt_totalrevenue_a
txt_totalrevenue_a in the subform in page 2 control source =
txt_revelement_a1 + txt_revelement a2 .....a10
Problem is when the txt_totalrevenue_a changes, it is not "inherited" to
the reference text box on page 1 unless the entire sub form on page 1 one
is reloaded.
As the sub form on page 1 is quite heavy I should like to update only
some of the text boxes, trigged by a kind of "isdirty" mode from
underlying pages.
Psaudo
When a revenue element in page 2 is changed and the txt_totalrevenue_a is
changed
Update all references to txt_totalrevenue_a on page 2......
Sorry for the messy explanation. Think kind of same as references between
cells in different Excel sheet.....
Any hints appreciated
Kind regards
Mr. Smith
.
- References:
- Refresh certain txtboxes on a page with Form referenes
- From: Mr. Smith
- Re: Refresh certain txtboxes on a page with Form referenes
- From: Graham Mandeno
- Refresh certain txtboxes on a page with Form referenes
- Prev by Date: Re: Cursor to the left end without selection?
- Next by Date: Re: UPDATE: Using a Combo Box to Find Records
- Previous by thread: Re: Refresh certain txtboxes on a page with Form referenes
- Next by thread: *** geneve-14k-yellow-gold-watch-OG-508 Cheapest
- Index(es):