Pull value from main form and write it in a subform inside a navigation control

edgaro

Registered User.
Local time
Today, 14:36
Joined
Jul 11, 2015
Messages
22
Hi, forum.

I'm struggling to figure out how to refer to a control without using VBA.

Here's the scenario:
I have a main form with a navigation control inside, it also has a few comboboxes. The navigation control has a subform. When I'm entering a new record in this subform, I'd like it to pull the selected value in on of the comboboxes inside one of the fields of the form, however, I can't figure out how to do this.

Also, I'd prefer not to use VBA for this one, I'm guessing there's a simple trick.

What I tried is adding forms!frmMain!cboBox in the criteria of the field inside the form's query design.

What can I do to put the value from the main form inside the field in the subform?

Thank you in advance. If you need an example, I can post my file.
 
Thanks. I already tried with those two sites before asking here, but they don't really deal with the problem, I was refering to the control the right way and I wasn't getting the value.

Anyway, I didn't quite solve it the way I wanted, but I guess that I can live with my solution; I created an unbound textbox in my main form, wrote "forms!mainform!cboBox.Column(0)" in the control source, named the textbox and refered to that textbox instead, from the subform that lived within the navigation subform. And then, in order to have that value when I'm creating a new record, I just put the reference to the textbox in the default value of the textbox in the subform.
 

Users who are viewing this thread

Back
Top Bottom