Send paramter from navigation to another navigation (1 Viewer)

ilanray

Member
Local time
Tomorrow, 01:17
Joined
Jan 3, 2023
Messages
116
Hi
I have a navigation form called "main_menu" with 2 button called "navigationSubForm7" and "NavigationSubForm9" with sub-form inside caled "F_Title".
When I am at navigationSubForm7, I would like to click on a button and load NavigationSubForm9 with a parameter I am sending. this parameter will go into checkbox and load the record I want . Then load the sub-form "f_title" with the same parameter
it suppose to be something like :
Code:
private sub tt_Click()
    [forms]![main_menu]!...... [choosestatus]=2
End Sub
the [choosestatus]=2 is the number I would like to input in my combobox

any ideas?

Thanks, Ilan
 

Ranman256

Well-known member
Local time
Today, 18:17
Joined
Apr 9, 2015
Messages
4,337
'assuming [ChoosStatus] is numeric:

docmd.openform "NavigationSubForm9", , , "[choosestatus]=" & cboBox
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 06:17
Joined
May 7, 2009
Messages
19,245
it is still unclear to me of what you need to do.
to Filter the ""NavigationSubForm9" you use:

DoCmd.BrowseTo


Code:
    DoCmd.BrowseTo ObjectType:=acBrowseToForm, _
            ObjectName:="F_Title", _
            PathToSubformControl:="main_menu.NavigationSubform", _
            WhereCondition:="ID = " & Me.ID
      
           Forms!main_menu!NavigationSubForm.Form!chooseStatus = [cboBox]

much easier to understand, if you can upload a sample db.
 

ilanray

Member
Local time
Tomorrow, 01:17
Joined
Jan 3, 2023
Messages
116
thanks for the anwer, stilll doesn't work
let me try to explain: i have main form called main menu. in the first navigation form called navigationSubForm7 I have 5 buttons. I would like to make an event click on each on eof them (5 buttons) . the event will send the number according to the button I click.
this will load the navigationSubForm9 and input on a textbox the number I sent
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 18:17
Joined
Feb 19, 2002
Messages
43,288
Instead of using the OpenArgs to pass values, add a hidden control to the main form. Put the value there and let the subforms reference the hidden control.
 

ilanray

Member
Local time
Tomorrow, 01:17
Joined
Jan 3, 2023
Messages
116
That's exactly my question. How do i call the other navigationSubform9 from navigationSubFotm7
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 18:17
Joined
Feb 19, 2002
Messages
43,288
That's exactly my question. How do i call the other navigationSubform9 from navigationSubFotm7
I don't know what that means? You CANNOT call other subforms when you are using a navigation form. Only ONE subform is ever loaded at one time (unless you did NOT use the Access navigation form but built your own as the rest of us who don't like the Access navigation form do). Therefore, you have to use the main form if you want to pass data from one subform to another.
 

Users who are viewing this thread

Top Bottom