PageName to Textbox

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

Guest

Hi!

I have a form with pages in TabCtl0.
Is possible to paste each PageName of this pages to textboxes in same form,
type:

Textbox1
Me!txtPageName = Forms!F_FormName!TabCtl0!PageName1

Textbox2
Me!txtPageName = Forms!F_FormName!TabCtl0!PageName2

Thanks in advance.
an
 
Try these:

Me!txtPageName = Forms!F_FormName!TabCtl0!Page(0).Name

Me!txtPageName = Forms!F_FormName!TabCtl0!Page(1).Name
 
Typo in first post:

Try these:

Me!txtPageName = Forms!F_FormName!TabCtl0!Pages(0).Name

Me!txtPageName = Forms!F_FormName!TabCtl0!Pages(1).Name
 
Try:
Me!txtPageName = Me.TabCtl0.Pages(Me.TabCtl0).Name
 
Return:
#Name?

ruralguy via AccessMonster.com said:
Try:
Me!txtPageName = Me.TabCtl0.Pages(Me.TabCtl0).Name


--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
Return:
#Name?


Ken Snell (MVP) said:
Typo in first post:

Try these:

Me!txtPageName = Forms!F_FormName!TabCtl0!Pages(0).Name

Me!txtPageName = Forms!F_FormName!TabCtl0!Pages(1).Name
 
Type the line using periods "." rather than the bang "!" and let the
Intellisense supply the control name. See if it comes up with the same names
as you have supplied.
Sorry, but are both correct.
They had been written with Copy/paste…
(?)
Thanks.
Either you TabCtl is not named TabCtl0 or the TextBox is not named
txtPageName
[quoted text clipped - 7 lines]
 
Suggests that
1) You don't have a form named "F_FormName".
or
2) A form named "F_FormName" is not open when your code runs.
or
3) You want to read the name from a different form than "F_FormName".

You'll need to tell us more about your setup ...
 
Sorry -- try this:

Me!txtPageName = Forms!F_FormName!TabCtl0.Pages(0).Name

Me!txtPageName = Forms!F_FormName!TabCtl0.Pages(1).Name
 
Sorry my ignorance.
What is Intellisense, please?


ruralguy via AccessMonster.com said:
Type the line using periods "." rather than the bang "!" and let the
Intellisense supply the control name. See if it comes up with the same names
as you have supplied.
Sorry, but are both correct.
They had been written with Copy/paste…
(?)
Thanks.
Either you TabCtl is not named TabCtl0 or the TextBox is not named
txtPageName
[quoted text clipped - 7 lines]
Thanks in advance.
an
 
After you type Me. a list pops up to select the next choice.
Sorry my ignorance.
What is Intellisense, please?
Type the line using periods "." rather than the bang "!" and let the
Intellisense supply the control name. See if it comes up with the same names
[quoted text clipped - 10 lines]
 
Sorry, but:

1) Already renamed the form exactly to F_FormName
2) The F_FormName is open when code runs
3) I read in F_FormName

4) Your expession is in Control Source of the F_FormName

In adition, I erase all in this form, except Tab Control with Name TabCtl0

:-(

Thanks
 
Put the code in the OnCurrent event of the form as a test.
Sorry, but:

1) Already renamed the form exactly to F_FormName
2) The F_FormName is open when code runs
3) I read in F_FormName

4) Your expession is in Control Source of the F_FormName

In adition, I erase all in this form, except Tab Control with Name TabCtl0

:-(

Thanks
Sorry -- try this:
[quoted text clipped - 27 lines]
 
When open the form:

Run-time error '2448':
"You can't a value to this object"

After open the form, the textbox:
#Name?

ruralguy via AccessMonster.com said:
Put the code in the OnCurrent event of the form as a test.
Sorry, but:

1) Already renamed the form exactly to F_FormName
2) The F_FormName is open when code runs
3) I read in F_FormName

4) Your expession is in Control Source of the F_FormName

In adition, I erase all in this form, except Tab Control with Name TabCtl0

:-(

Thanks
Sorry -- try this:
[quoted text clipped - 27 lines]
Thanks in advance.
an

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
The Control Source expression should be this:

= Forms!F_FormName!TabCtl0.Pages(0).Name
 
YEEESSS!!!

Thank you very much for your help.
(04H05, I go to sleep)
A good weekend for you!
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