Subform and 'Select' statement in a control

G

Guest

Hi!!
I have a main form with a sub form , I have linked the [number] field
between the main form and the sub form through a control using SELECT
statement to select the values from a Linked Table , they work properly, the
sub form is based on a select query and shows the selection made by the
control; In the sub form I tried to do a similar, I have a combo box that I
want to show me a data pulled from the following statement:

SELECT OMS.Date FROM OMS WHERE OMS.NumOMS=Forms!Q1FF!NOMS;

I tried this with the sub form out of the main form and work fine!, but when
I insert the sub form into the main form again, the control doesn't work and
asking for Enter the Parameter Value,I missing something??, I will appreciate
your help!!
 
T

tina

when you open the subform by itself, it's a form like any other, and the
reference you use works. when you use it as a subform, within a mainform,
Access does not "see" it as a stand-alone form - so you have to reference it
from within the context of the mainform, as

Forms!MainformName!SubformControlName.Form!NOMS

note that SubformControlName refers to the control within the main form that
"contains" the subform. make sure you refer to that control's name, rather
than the name of the subform Q1FF. depending on how the subform was added to
the mainform, the two names may be the same or they may be different.

hth
 
G

Guest

Tina, that's was very helpfull !!, thank you very much!!!

tina said:
when you open the subform by itself, it's a form like any other, and the
reference you use works. when you use it as a subform, within a mainform,
Access does not "see" it as a stand-alone form - so you have to reference it
from within the context of the mainform, as

Forms!MainformName!SubformControlName.Form!NOMS

note that SubformControlName refers to the control within the main form that
"contains" the subform. make sure you refer to that control's name, rather
than the name of the subform Q1FF. depending on how the subform was added to
the mainform, the two names may be the same or they may be different.

hth


OCTTAR said:
Hi!!
I have a main form with a sub form , I have linked the [number] field
between the main form and the sub form through a control using SELECT
statement to select the values from a Linked Table , they work properly, the
sub form is based on a select query and shows the selection made by the
control; In the sub form I tried to do a similar, I have a combo box that I
want to show me a data pulled from the following statement:

SELECT OMS.Date FROM OMS WHERE OMS.NumOMS=Forms!Q1FF!NOMS;

I tried this with the sub form out of the main form and work fine!, but when
I insert the sub form into the main form again, the control doesn't work and
asking for Enter the Parameter Value,I missing something??, I will appreciate
your help!!
 
T

tina

you're welcome :)


OCTTAR said:
Tina, that's was very helpfull !!, thank you very much!!!

tina said:
when you open the subform by itself, it's a form like any other, and the
reference you use works. when you use it as a subform, within a mainform,
Access does not "see" it as a stand-alone form - so you have to reference it
from within the context of the mainform, as

Forms!MainformName!SubformControlName.Form!NOMS

note that SubformControlName refers to the control within the main form that
"contains" the subform. make sure you refer to that control's name, rather
than the name of the subform Q1FF. depending on how the subform was added to
the mainform, the two names may be the same or they may be different.

hth


OCTTAR said:
Hi!!
I have a main form with a sub form , I have linked the [number] field
between the main form and the sub form through a control using SELECT
statement to select the values from a Linked Table , they work
properly,
the
sub form is based on a select query and shows the selection made by the
control; In the sub form I tried to do a similar, I have a combo box
that
I
want to show me a data pulled from the following statement:

SELECT OMS.Date FROM OMS WHERE OMS.NumOMS=Forms!Q1FF!NOMS;

I tried this with the sub form out of the main form and work fine!,
but
when
I insert the sub form into the main form again, the control doesn't
work
and
asking for Enter the Parameter Value,I missing something??, I will appreciate
your help!!
 

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