Form/SubForm Problem

B

Bob V

On my SubForm I have a Control (OnClick) :
Forms![frmAccountStatus]![tbModeOfPayment].AddItem
Me.tbModeOfPaymentChild.Text
That copies the text data out of textbox tbModeOfPaymentChild and enters it
in Parent Form [frmAccountStatus]![tbModeOfPayment]
But I am getting this error: "You Cant reference propety or Methord for a
Control unless the control has the focus"
Thanks Bob
 
A

Arvin Meyer [MVP]

The text property requires focus, you want the Value property (which is the
default) Try it with:

Me.tbModeOfPayment.Form = Me.Parent.tbModeOfPaymentChild
 
B

Bob V

Thanks Arvin , I tried that on my OnClick of my Control but am getting the
yellow line error
Thanks Bob

Arvin Meyer said:
The text property requires focus, you want the Value property (which is
the default) Try it with:

Me.tbModeOfPayment.Form = Me.Parent.tbModeOfPaymentChild
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Bob V said:
On my SubForm I have a Control (OnClick) :
Forms![frmAccountStatus]![tbModeOfPayment].AddItem
Me.tbModeOfPaymentChild.Text
That copies the text data out of textbox tbModeOfPaymentChild and enters
it in Parent Form [frmAccountStatus]![tbModeOfPayment]
But I am getting this error: "You Cant reference propety or Methord for a
Control unless the control has the focus"
Thanks Bob
 
B

Bob V

I GOT IT :)
Me.Parent!tbModeOfPayment = Me!tbModeOfPaymentChild.value
Thanks for the help BOB

Bob V said:
Thanks Arvin , I tried that on my OnClick of my Control but am getting the
yellow line error
Thanks Bob

Arvin Meyer said:
The text property requires focus, you want the Value property (which is
the default) Try it with:

Me.tbModeOfPayment.Form = Me.Parent.tbModeOfPaymentChild
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Bob V said:
On my SubForm I have a Control (OnClick) :
Forms![frmAccountStatus]![tbModeOfPayment].AddItem
Me.tbModeOfPaymentChild.Text
That copies the text data out of textbox tbModeOfPaymentChild and enters
it in Parent Form [frmAccountStatus]![tbModeOfPayment]
But I am getting this error: "You Cant reference propety or Methord for
a Control unless the control has the focus"
Thanks Bob
 

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