Transfer info from textbox in main form to textbox in subform (1 Viewer)

Alvin85

Registered User.
Local time
Today, 23:07
Joined
Jul 7, 2018
Messages
17
I have 2 forms namely PrecedencePage and OverviewPage. I have 1 textbox named txt_fine and 1 button named btn_view in PrecedencePage. I have a textbox name txtView in OverviewPage. The idea is for the txtview in OverviewPage to see what user had key in previously in PrecedencePage's txt_fine.*

I tried the following coding but it state run time error 2465: miscrosoft access cant find the field 'overviewpage' referred to in your expression.

Form("OverviewPage").txtView.value = me.txt_fine.value

May i know where is the mistake and how to correct it?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:07
Joined
Feb 19, 2002
Messages
43,474
It is not normal for a parent record to hold a copy of the value of a field in some random child record. What you are asking doesn't make sense but the syntax would be.

Forms!OverviewPage!txtView = Me.txt_fine

The code would be in some event on the subform since you are copying a value from the subform to the main form.
HOWEVER, the OverviewPage form MUST be open for this to work.
 

Alvin85

Registered User.
Local time
Today, 23:07
Joined
Jul 7, 2018
Messages
17
Thank you :) on the same note, is there a way to do it without having the need of the overview page to be open?
 

Mark_

Longboard on the internet
Local time
Today, 08:07
Joined
Sep 12, 2017
Messages
2,111
You wouldn't be able to fill in a control on a form that is not open.

Are you trying to do something else?
 

Alvin85

Registered User.
Local time
Today, 23:07
Joined
Jul 7, 2018
Messages
17
No i not. I m just curious if there is. Thank you:)
 

Users who are viewing this thread

Top Bottom