Navigation form (1 Viewer)

zezo2021

Member
Local time
Today, 22:32
Joined
Mar 25, 2021
Messages
381
friends;

I have a Navigation form with many tabs

How can I get value from the Navigation textbox to another navigation textbox?

tab1.navigation.textbox =tab2.navigation.textbox
 

zezo2021

Member
Local time
Today, 22:32
Joined
Mar 25, 2021
Messages
381
could you give me example
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:32
Joined
Feb 19, 2002
Messages
42,974
How can I get value from the Navigation textbox to another navigation textbox?
Let me explain in more detail for future readers. The Access navigation form uses only ONE subform control. That means that only ONE subform can ever be loaded at one time so you cannot ever refer to subformB from subformA since they will never be loaded at the same time.

theDBguy's suggestion to use Tempvars solves the problem but it is a two step process. subformA populates the TempVar with the value but subformB has to pick up the value from the TempVar and do something with it.
 

VzqCrs

Member
Local time
Today, 16:32
Joined
Nov 15, 2021
Messages
54
So how was the issue resolved with TempVars? I have a similar question
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:32
Joined
Oct 29, 2018
Messages
21,358
So how was the issue resolved with TempVars? I have a similar question
Basically, when you're on the form you want to grab the info from, you would assign it to a tempvar. For example:
Code:
TempVars.Add "TempVarName', Me.ControlName.Value
Then, when you're on the form you want to pass that info, you would use the tempvar like so:
Code:
Me.ControlName = TempVars!TempVarName
Hope that helps...
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:32
Joined
Feb 19, 2002
Messages
42,974
TempVars are global and do not belong to a specific form. You define them in standard modules rather than the class module of a form
 

Users who are viewing this thread

Top Bottom