Requery Page in TabCtl

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Acc2007

I have a main form with TabCtl2 with pages and cboRecord to choose records.

PageA has a SubF_01 wtih txtDtBorn to write date born and another txtAge to
calc Age.

PageB has SubF_02 with another fields.

In SubF_02 OnEnter I have:

If [SubF_01]![txtAge] < 10 Then
[SubF_02]![txtXPTO].Enabled = True
Else
[SubF_02]![txtXPTO].Enabled = False
End if

I would like to do requery PageB fields after change txtDtBorn.
Now only to do requery the state fields if I click newrly in cboRecord in
main form to confirm record.

I would like any idea to requery after change date, please.
Thanks in advance.
an
 
Hi Ann,

Try the following:

in the afterupdate of txtDtBorn place something like:

forms!Mainformname!tabctl.pages("pageB").requery
This will reqeury pageB

For the second part I have to know where the "state"-field resides? Is this
also on pageB or is this on the main form?

You might try something like:

afterupdate cboRecord:
if me.cborecord=1 then
me.state.requery
end if

The number is abitrary if you don't have numbering in your combobox you
could also enter if me.cboRecord="newrly" (typo?)

let me know if this clarifies things a little...
 
Ok M,
Thank you for reply.
"...where the "state"-field resides? Is this also on pageB or is this on the
main form?"

- In pageB.

Thanks more one time.
an


Maurice said:
Hi Ann,

Try the following:

in the afterupdate of txtDtBorn place something like:

forms!Mainformname!tabctl.pages("pageB").requery
This will reqeury pageB

For the second part I have to know where the "state"-field resides? Is this
also on pageB or is this on the main form?

You might try something like:

afterupdate cboRecord:
if me.cborecord=1 then
me.state.requery
end if

The number is abitrary if you don't have numbering in your combobox you
could also enter if me.cboRecord="newrly" (typo?)

let me know if this clarifies things a little...
--
Maurice Ausum


an said:
Acc2007

I have a main form with TabCtl2 with pages and cboRecord to choose records.

PageA has a SubF_01 wtih txtDtBorn to write date born and another txtAge to
calc Age.

PageB has SubF_02 with another fields.

In SubF_02 OnEnter I have:

If [SubF_01]![txtAge] < 10 Then
[SubF_02]![txtXPTO].Enabled = True
Else
[SubF_02]![txtXPTO].Enabled = False
End if

I would like to do requery PageB fields after change txtDtBorn.
Now only to do requery the state fields if I click newrly in cboRecord in
main form to confirm record.

I would like any idea to requery after change date, please.
Thanks in advance.
an
 
In that case you should place the following in the afterupdate for the combo:

if me.cborecord=1 then
forms!Mainformname!tabctl.pages("pageB").controls.item("state").requery
end if

hth
--
Maurice Ausum


an said:
Ok M,
Thank you for reply.
"...where the "state"-field resides? Is this also on pageB or is this on the
main form?"

- In pageB.

Thanks more one time.
an


Maurice said:
Hi Ann,

Try the following:

in the afterupdate of txtDtBorn place something like:

forms!Mainformname!tabctl.pages("pageB").requery
This will reqeury pageB

For the second part I have to know where the "state"-field resides? Is this
also on pageB or is this on the main form?

You might try something like:

afterupdate cboRecord:
if me.cborecord=1 then
me.state.requery
end if

The number is abitrary if you don't have numbering in your combobox you
could also enter if me.cboRecord="newrly" (typo?)

let me know if this clarifies things a little...
--
Maurice Ausum


an said:
Acc2007

I have a main form with TabCtl2 with pages and cboRecord to choose records.

PageA has a SubF_01 wtih txtDtBorn to write date born and another txtAge to
calc Age.

PageB has SubF_02 with another fields.

In SubF_02 OnEnter I have:

If [SubF_01]![txtAge] < 10 Then
[SubF_02]![txtXPTO].Enabled = True
Else
[SubF_02]![txtXPTO].Enabled = False
End if

I would like to do requery PageB fields after change txtDtBorn.
Now only to do requery the state fields if I click newrly in cboRecord in
main form to confirm record.

I would like any idea to requery after change date, please.
Thanks in advance.
an
 
Thank you, M.

If in case:
the "state"-field resides in MainForm, please?

Thanks more one time.
an


Maurice said:
In that case you should place the following in the afterupdate for the combo:

if me.cborecord=1 then
forms!Mainformname!tabctl.pages("pageB").controls.item("state").requery
end if

hth
--
Maurice Ausum


an said:
Ok M,
Thank you for reply.
"...where the "state"-field resides? Is this also on pageB or is this on the
main form?"

- In pageB.

Thanks more one time.
an


Maurice said:
Hi Ann,

Try the following:

in the afterupdate of txtDtBorn place something like:

forms!Mainformname!tabctl.pages("pageB").requery
This will reqeury pageB

For the second part I have to know where the "state"-field resides? Is this
also on pageB or is this on the main form?

You might try something like:

afterupdate cboRecord:
if me.cborecord=1 then
me.state.requery
end if

The number is abitrary if you don't have numbering in your combobox you
could also enter if me.cboRecord="newrly" (typo?)

let me know if this clarifies things a little...
--
Maurice Ausum


:

Acc2007

I have a main form with TabCtl2 with pages and cboRecord to choose records.

PageA has a SubF_01 wtih txtDtBorn to write date born and another txtAge to
calc Age.

PageB has SubF_02 with another fields.

In SubF_02 OnEnter I have:

If [SubF_01]![txtAge] < 10 Then
[SubF_02]![txtXPTO].Enabled = True
Else
[SubF_02]![txtXPTO].Enabled = False
End if

I would like to do requery PageB fields after change txtDtBorn.
Now only to do requery the state fields if I click newrly in cboRecord in
main form to confirm record.

I would like any idea to requery after change date, please.
Thanks in advance.
an
 
In case it's on the main form you can just refer to the control as follows:

me.state.requery

hth
--
Maurice Ausum


an said:
Thank you, M.

If in case:
the "state"-field resides in MainForm, please?

Thanks more one time.
an


Maurice said:
In that case you should place the following in the afterupdate for the combo:

if me.cborecord=1 then
forms!Mainformname!tabctl.pages("pageB").controls.item("state").requery
end if

hth
--
Maurice Ausum


an said:
Ok M,
Thank you for reply.
"...where the "state"-field resides? Is this also on pageB or is this on the
main form?"

- In pageB.

Thanks more one time.
an


:

Hi Ann,

Try the following:

in the afterupdate of txtDtBorn place something like:

forms!Mainformname!tabctl.pages("pageB").requery
This will reqeury pageB

For the second part I have to know where the "state"-field resides? Is this
also on pageB or is this on the main form?

You might try something like:

afterupdate cboRecord:
if me.cborecord=1 then
me.state.requery
end if

The number is abitrary if you don't have numbering in your combobox you
could also enter if me.cboRecord="newrly" (typo?)

let me know if this clarifies things a little...
--
Maurice Ausum


:

Acc2007

I have a main form with TabCtl2 with pages and cboRecord to choose records.

PageA has a SubF_01 wtih txtDtBorn to write date born and another txtAge to
calc Age.

PageB has SubF_02 with another fields.

In SubF_02 OnEnter I have:

If [SubF_01]![txtAge] < 10 Then
[SubF_02]![txtXPTO].Enabled = True
Else
[SubF_02]![txtXPTO].Enabled = False
End if

I would like to do requery PageB fields after change txtDtBorn.
Now only to do requery the state fields if I click newrly in cboRecord in
main form to confirm record.

I would like any idea to requery after change date, please.
Thanks in advance.
an
 

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

Back
Top