Enter Parameter Value on a subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a main form called AddBlend and a subform called BlendReport. The
BlendReport for a combo box called ComboBlend and a text box called txtDate.
There is then a report based on a Query called BlendNameQTY. The query has
the parameter values in the criteria section so it looks for what is in the
combo box and text and then runs the query. When I added this subform to my
main form and run the report I get a message"Enter Parameter Value
Forms!BlendReport!ComboBlend" and then "Enter Parameter Value
Forms!BlendReport!TxtDate". If I click ok the report give me everything.
However, if I go to the forms list and then select the subform only and then
enter a value in the combo box and text box the report (and query) run
correctly. But if it is a subform it does not. Can anyone help?

Thanks,
 
Hi,

I have a main form called AddBlend and a subform called BlendReport. The
BlendReport for a combo box called ComboBlend and a text box called txtDate.
There is then a report based on a Query called BlendNameQTY. The query has
the parameter values in the criteria section so it looks for what is in the
combo box and text and then runs the query. When I added this subform to my
main form and run the report I get a message"Enter Parameter Value
Forms!BlendReport!ComboBlend" and then "Enter Parameter Value
Forms!BlendReport!TxtDate". If I click ok the report give me everything.
However, if I go to the forms list and then select the subform only and then
enter a value in the combo box and text box the report (and query) run
correctly. But if it is a subform it does not. Can anyone help?

Referencing a control on a Subform is a bit peculiar. A Subform is not
a member of the Forms collection, and it isn't open in its own right.
You need to navigate to it through the name of the main form, and the
name of the Subform control on that form. The "subform control" is the
box containing the Subform, which may or may not have the same name as
the form within it; if you used the Access form builder, it probably
does. Try

[Forms]![AddBlend]![BlendReport].Form![ComboBlend]
[Forms]![AddBlend]![BlendReport].Form![txtDate]

as criteria.

John W. Vinson [MVP]
 
Thanks John. Your suggestion worked.
--
Chuck W


John W. Vinson said:
Hi,

I have a main form called AddBlend and a subform called BlendReport. The
BlendReport for a combo box called ComboBlend and a text box called txtDate.
There is then a report based on a Query called BlendNameQTY. The query has
the parameter values in the criteria section so it looks for what is in the
combo box and text and then runs the query. When I added this subform to my
main form and run the report I get a message"Enter Parameter Value
Forms!BlendReport!ComboBlend" and then "Enter Parameter Value
Forms!BlendReport!TxtDate". If I click ok the report give me everything.
However, if I go to the forms list and then select the subform only and then
enter a value in the combo box and text box the report (and query) run
correctly. But if it is a subform it does not. Can anyone help?

Referencing a control on a Subform is a bit peculiar. A Subform is not
a member of the Forms collection, and it isn't open in its own right.
You need to navigate to it through the name of the main form, and the
name of the Subform control on that form. The "subform control" is the
box containing the Subform, which may or may not have the same name as
the form within it; if you used the Access form builder, it probably
does. Try

[Forms]![AddBlend]![BlendReport].Form![ComboBlend]
[Forms]![AddBlend]![BlendReport].Form![txtDate]

as criteria.

John W. Vinson [MVP]
 
I am having the same problem, but my control is named correctly as I used the
Builder Tool to create the criteria.

Enter Parameter Value: Forms!2ResponseFormA!2ResponseFormB.Form!QNoID

My query criteria is
[QNoID]=[Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]

Sometimes I can get it to work by opening the query (while the form is open)
and using the Builder Tool again to create the criteria. After I close the
form and/or the database, I get the same messag again when I reopen the form.

Thanks for your help!

John W. Vinson said:
Hi,

I have a main form called AddBlend and a subform called BlendReport. The
BlendReport for a combo box called ComboBlend and a text box called txtDate.
There is then a report based on a Query called BlendNameQTY. The query has
the parameter values in the criteria section so it looks for what is in the
combo box and text and then runs the query. When I added this subform to my
main form and run the report I get a message"Enter Parameter Value
Forms!BlendReport!ComboBlend" and then "Enter Parameter Value
Forms!BlendReport!TxtDate". If I click ok the report give me everything.
However, if I go to the forms list and then select the subform only and then
enter a value in the combo box and text box the report (and query) run
correctly. But if it is a subform it does not. Can anyone help?

Referencing a control on a Subform is a bit peculiar. A Subform is not
a member of the Forms collection, and it isn't open in its own right.
You need to navigate to it through the name of the main form, and the
name of the Subform control on that form. The "subform control" is the
box containing the Subform, which may or may not have the same name as
the form within it; if you used the Access form builder, it probably
does. Try

[Forms]![AddBlend]![BlendReport].Form![ComboBlend]
[Forms]![AddBlend]![BlendReport].Form![txtDate]

as criteria.

John W. Vinson [MVP]
 
I am having the same problem, but my control is named correctly as I used the
Builder Tool to create the criteria.

Enter Parameter Value: Forms!2ResponseFormA!2ResponseFormB.Form!QNoID

My query criteria is
[QNoID]=[Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]

Sometimes I can get it to work by opening the query (while the form is open)
and using the Builder Tool again to create the criteria. After I close the
form and/or the database, I get the same messag again when I reopen the form.

That's odd. It suggests that 2ResponseFormA might not be open at the time.

If it is, try opening the query in SQL view and inserting

PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID] Long;

before the SELECT keyword in the query.
 
When I change my SQL query to include your suggestion, I get "Syntax error in
PARAMETER clause."

My updated query, which is the row source for [RespNo] control on
[2ResponseFormC], a subform of B:

PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID] Long
SELECT DISTINCT [3Responses].RId, [3Responses].Response AS RespNo,
[3Responses].QuestID, [2RespQryA].QNoID, [2RespQryA].SurvType,
[2RespQryA].QCat, [2RespQryA].QNo
FROM 2RespQryA INNER JOIN 3Responses ON [2RespQryA].QNoID =
[3Responses].QuestID
WHERE
((([2RespQryA].QNoID)=[Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]))
ORDER BY [3Responses].RId;

When I have Subform [2ResponseFormB] open in its own window, I can set the
WHERE clause as [2RespQryA].QNoID=[Forms]![2ResponseFormB].[QNoID] and it
works fine. But when I open [2ReponseFormA], the I get the Parameter Value
message again.



John W. Vinson said:
I am having the same problem, but my control is named correctly as I used the
Builder Tool to create the criteria.

Enter Parameter Value: Forms!2ResponseFormA!2ResponseFormB.Form!QNoID

My query criteria is
[QNoID]=[Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]

Sometimes I can get it to work by opening the query (while the form is open)
and using the Builder Tool again to create the criteria. After I close the
form and/or the database, I get the same messag again when I reopen the form.

That's odd. It suggests that 2ResponseFormA might not be open at the time.

If it is, try opening the query in SQL view and inserting

PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID] Long;

before the SELECT keyword in the query.
 
When I change my SQL query to include your suggestion, I get "Syntax error in
PARAMETER clause."

My updated query, which is the row source for [RespNo] control on
[2ResponseFormC], a subform of B:

PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID] Long

The only thing I can see is that there should be a semicolon; after Long.
 
Even with the semicolon, I still get the "Enter Parameter Value" message.

John W. Vinson said:
When I change my SQL query to include your suggestion, I get "Syntax error in
PARAMETER clause."

My updated query, which is the row source for [RespNo] control on
[2ResponseFormC], a subform of B:

PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID] Long

The only thing I can see is that there should be a semicolon; after Long.
 
The syntax you're using implies that you're trying to read the value
contained in control QNoID on a subform of form 2ResponseFormA. Are you
certain that the name of the subform control on form 2ResponseFormA is, in
fact, 2ResponseFormB? Depending on how you added the subform, the name of
the subform control may be different than the name of the form being used as
a subform.

I assume form 2ResponseFormA is open when you're running the query. (Access
won't open the form for you.)

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sara M said:
Even with the semicolon, I still get the "Enter Parameter Value" message.

John W. Vinson said:
When I change my SQL query to include your suggestion, I get "Syntax
error in
PARAMETER clause."

My updated query, which is the row source for [RespNo] control on
[2ResponseFormC], a subform of B:

PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID] Long

The only thing I can see is that there should be a semicolon; after Long.
 
See below.

Douglas J. Steele said:
The syntax you're using implies that you're trying to read the value
contained in control QNoID on a subform of form 2ResponseFormA.

Yes, that's correct.

Are you
certain that the name of the subform control on form 2ResponseFormA is, in
fact, 2ResponseFormB? Depending on how you added the subform, the name of
the subform control may be different than the name of the form being used as
a subform.

On the property sheet, it shows the source object is "2ResponseFormC" and
the Name is "2ResponseFormC," likewise for FormB.
I assume form 2ResponseFormA is open when you're running the query. (Access
won't open the form for you.)

Yes, A is open. A is linked to B by "SurvID", B is linked to C by
"SurvRespID." Form A shows the basic information on the survey. Form B shows
the question and related comments. Form C (continuous) allows for multiple
answers to the questions in Form B.

I can run the query separately and it works fine and pulls the approrpriate
data. But when it is the row source for field [QNoID], I get the Enter
parameter value message.
--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sara M said:
Even with the semicolon, I still get the "Enter Parameter Value" message.

John W. Vinson said:
On Mon, 1 Feb 2010 07:15:01 -0800, Sara M
<[email protected]>
wrote:

When I change my SQL query to include your suggestion, I get "Syntax
error in
PARAMETER clause."

My updated query, which is the row source for [RespNo] control on
[2ResponseFormC], a subform of B:

PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID] Long

The only thing I can see is that there should be a semicolon; after Long.


.
 
I'm confused.

I asked whether you were certain that the name of the subform control on
form 2ResponseFormA was 2ResponseFormB, and you answered
On the property sheet, it shows the source object is "2ResponseFormC" and
the Name is "2ResponseFormC," likewise for FormB.


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sara M said:
See below.

Douglas J. Steele said:
The syntax you're using implies that you're trying to read the value
contained in control QNoID on a subform of form 2ResponseFormA.

Yes, that's correct.

Are you
certain that the name of the subform control on form 2ResponseFormA is,
in
fact, 2ResponseFormB? Depending on how you added the subform, the name of
the subform control may be different than the name of the form being used
as
a subform.

On the property sheet, it shows the source object is "2ResponseFormC" and
the Name is "2ResponseFormC," likewise for FormB.
I assume form 2ResponseFormA is open when you're running the query.
(Access
won't open the form for you.)

Yes, A is open. A is linked to B by "SurvID", B is linked to C by
"SurvRespID." Form A shows the basic information on the survey. Form B
shows
the question and related comments. Form C (continuous) allows for multiple
answers to the questions in Form B.

I can run the query separately and it works fine and pulls the
approrpriate
data. But when it is the row source for field [QNoID], I get the Enter
parameter value message.
--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sara M said:
Even with the semicolon, I still get the "Enter Parameter Value"
message.

:

On Mon, 1 Feb 2010 07:15:01 -0800, Sara M
<[email protected]>
wrote:

When I change my SQL query to include your suggestion, I get "Syntax
error in
PARAMETER clause."

My updated query, which is the row source for [RespNo] control on
[2ResponseFormC], a subform of B:

PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]
Long

The only thing I can see is that there should be a semicolon; after
Long.


.
 
Sorry. With 2ResponseFormA open, the property sheet for my subform control
shows the source object as "2ResponseFormB" and the name as "2ResponseFormB."

The subform within 2ResponseFormB has the source object and name of
"2ResponseFormC." My combo box that isn't populating correctly is on
2ResponseFormC.

Douglas J. Steele said:
I'm confused.

I asked whether you were certain that the name of the subform control on
form 2ResponseFormA was 2ResponseFormB, and you answered
On the property sheet, it shows the source object is "2ResponseFormC" and
the Name is "2ResponseFormC," likewise for FormB.


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sara M said:
See below.

Douglas J. Steele said:
The syntax you're using implies that you're trying to read the value
contained in control QNoID on a subform of form 2ResponseFormA.

Yes, that's correct.

Are you
certain that the name of the subform control on form 2ResponseFormA is,
in
fact, 2ResponseFormB? Depending on how you added the subform, the name of
the subform control may be different than the name of the form being used
as
a subform.

On the property sheet, it shows the source object is "2ResponseFormC" and
the Name is "2ResponseFormC," likewise for FormB.
I assume form 2ResponseFormA is open when you're running the query.
(Access
won't open the form for you.)

Yes, A is open. A is linked to B by "SurvID", B is linked to C by
"SurvRespID." Form A shows the basic information on the survey. Form B
shows
the question and related comments. Form C (continuous) allows for multiple
answers to the questions in Form B.

I can run the query separately and it works fine and pulls the
approrpriate
data. But when it is the row source for field [QNoID], I get the Enter
parameter value message.
--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Even with the semicolon, I still get the "Enter Parameter Value"
message.

:

On Mon, 1 Feb 2010 07:15:01 -0800, Sara M
<[email protected]>
wrote:

When I change my SQL query to include your suggestion, I get "Syntax
error in
PARAMETER clause."

My updated query, which is the row source for [RespNo] control on
[2ResponseFormC], a subform of B:

PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]
Long

The only thing I can see is that there should be a semicolon; after
Long.
--

John W. Vinson [MVP]
.



.


.
 
So what's the entire SQL of your query now?

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sara M said:
Sorry. With 2ResponseFormA open, the property sheet for my subform control
shows the source object as "2ResponseFormB" and the name as
"2ResponseFormB."

The subform within 2ResponseFormB has the source object and name of
"2ResponseFormC." My combo box that isn't populating correctly is on
2ResponseFormC.

Douglas J. Steele said:
I'm confused.

I asked whether you were certain that the name of the subform control on
form 2ResponseFormA was 2ResponseFormB, and you answered
On the property sheet, it shows the source object is "2ResponseFormC"
and
the Name is "2ResponseFormC," likewise for FormB.


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sara M said:
See below.

:

The syntax you're using implies that you're trying to read the value
contained in control QNoID on a subform of form 2ResponseFormA.

Yes, that's correct.

Are you
certain that the name of the subform control on form 2ResponseFormA
is,
in
fact, 2ResponseFormB? Depending on how you added the subform, the name
of
the subform control may be different than the name of the form being
used
as
a subform.

On the property sheet, it shows the source object is "2ResponseFormC"
and
the Name is "2ResponseFormC," likewise for FormB.


I assume form 2ResponseFormA is open when you're running the query.
(Access
won't open the form for you.)

Yes, A is open. A is linked to B by "SurvID", B is linked to C by
"SurvRespID." Form A shows the basic information on the survey. Form B
shows
the question and related comments. Form C (continuous) allows for
multiple
answers to the questions in Form B.

I can run the query separately and it works fine and pulls the
approrpriate
data. But when it is the row source for field [QNoID], I get the Enter
parameter value message.


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Even with the semicolon, I still get the "Enter Parameter Value"
message.

:

On Mon, 1 Feb 2010 07:15:01 -0800, Sara M
<[email protected]>
wrote:

When I change my SQL query to include your suggestion, I get
"Syntax
error in
PARAMETER clause."

My updated query, which is the row source for [RespNo] control on
[2ResponseFormC], a subform of B:

PARAMETERS
[Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]
Long

The only thing I can see is that there should be a semicolon; after
Long.
--

John W. Vinson [MVP]
.



.


.
 
PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID] IEEEDouble;
SELECT [3Responses].RId, [3Responses].Response, [3Responses].QuestID
FROM 3Responses
WHERE
((([3Responses].QuestID)=[Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]))
ORDER BY [3Responses].RId;

(My [QNoID] field has a "double" field size.)

Douglas J. Steele said:
So what's the entire SQL of your query now?

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sara M said:
Sorry. With 2ResponseFormA open, the property sheet for my subform control
shows the source object as "2ResponseFormB" and the name as
"2ResponseFormB."

The subform within 2ResponseFormB has the source object and name of
"2ResponseFormC." My combo box that isn't populating correctly is on
2ResponseFormC.

Douglas J. Steele said:
I'm confused.

I asked whether you were certain that the name of the subform control on
form 2ResponseFormA was 2ResponseFormB, and you answered

On the property sheet, it shows the source object is "2ResponseFormC"
and
the Name is "2ResponseFormC," likewise for FormB.


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

See below.

:

The syntax you're using implies that you're trying to read the value
contained in control QNoID on a subform of form 2ResponseFormA.

Yes, that's correct.

Are you
certain that the name of the subform control on form 2ResponseFormA
is,
in
fact, 2ResponseFormB? Depending on how you added the subform, the name
of
the subform control may be different than the name of the form being
used
as
a subform.

On the property sheet, it shows the source object is "2ResponseFormC"
and
the Name is "2ResponseFormC," likewise for FormB.


I assume form 2ResponseFormA is open when you're running the query.
(Access
won't open the form for you.)

Yes, A is open. A is linked to B by "SurvID", B is linked to C by
"SurvRespID." Form A shows the basic information on the survey. Form B
shows
the question and related comments. Form C (continuous) allows for
multiple
answers to the questions in Form B.

I can run the query separately and it works fine and pulls the
approrpriate
data. But when it is the row source for field [QNoID], I get the Enter
parameter value message.


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Even with the semicolon, I still get the "Enter Parameter Value"
message.

:

On Mon, 1 Feb 2010 07:15:01 -0800, Sara M
<[email protected]>
wrote:

When I change my SQL query to include your suggestion, I get
"Syntax
error in
PARAMETER clause."

My updated query, which is the row source for [RespNo] control on
[2ResponseFormC], a subform of B:

PARAMETERS
[Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]
Long

The only thing I can see is that there should be a semicolon; after
Long.
--

John W. Vinson [MVP]
.



.



.


.
 
I don't believe IEEDouble is a valid datatype in conjunction with the
PARAMETERS declaration.

See http://msdn.microsoft.com/en-us/library/bb208916.aspx for details on the
PARAMETERS declaration, and follow the link to
http://msdn.microsoft.com/en-us/library/bb208866.aspx for valid datatypes.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sara M said:
PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]
IEEEDouble;
SELECT [3Responses].RId, [3Responses].Response, [3Responses].QuestID
FROM 3Responses
WHERE
((([3Responses].QuestID)=[Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]))
ORDER BY [3Responses].RId;

(My [QNoID] field has a "double" field size.)

Douglas J. Steele said:
So what's the entire SQL of your query now?

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sara M said:
Sorry. With 2ResponseFormA open, the property sheet for my subform
control
shows the source object as "2ResponseFormB" and the name as
"2ResponseFormB."

The subform within 2ResponseFormB has the source object and name of
"2ResponseFormC." My combo box that isn't populating correctly is on
2ResponseFormC.

:

I'm confused.

I asked whether you were certain that the name of the subform control
on
form 2ResponseFormA was 2ResponseFormB, and you answered

On the property sheet, it shows the source object is
"2ResponseFormC"
and
the Name is "2ResponseFormC," likewise for FormB.


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

See below.

:

The syntax you're using implies that you're trying to read the
value
contained in control QNoID on a subform of form 2ResponseFormA.

Yes, that's correct.

Are you
certain that the name of the subform control on form 2ResponseFormA
is,
in
fact, 2ResponseFormB? Depending on how you added the subform, the
name
of
the subform control may be different than the name of the form
being
used
as
a subform.

On the property sheet, it shows the source object is
"2ResponseFormC"
and
the Name is "2ResponseFormC," likewise for FormB.


I assume form 2ResponseFormA is open when you're running the query.
(Access
won't open the form for you.)

Yes, A is open. A is linked to B by "SurvID", B is linked to C by
"SurvRespID." Form A shows the basic information on the survey. Form
B
shows
the question and related comments. Form C (continuous) allows for
multiple
answers to the questions in Form B.

I can run the query separately and it works fine and pulls the
approrpriate
data. But when it is the row source for field [QNoID], I get the
Enter
parameter value message.


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Even with the semicolon, I still get the "Enter Parameter Value"
message.

:

On Mon, 1 Feb 2010 07:15:01 -0800, Sara M
<[email protected]>
wrote:

When I change my SQL query to include your suggestion, I get
"Syntax
error in
PARAMETER clause."

My updated query, which is the row source for [RespNo] control
on
[2ResponseFormC], a subform of B:

PARAMETERS
[Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]
Long

The only thing I can see is that there should be a semicolon;
after
Long.
--

John W. Vinson [MVP]
.



.



.


.
 
The IEEDouble was automatically added when I used the "Parameter" feature in
the query design view.

Good I recreated all three forms, and their underlying queries, and
now it works. I only wish I could understand why it didn't work before!

Thanks for your help!

Douglas J. Steele said:
I don't believe IEEDouble is a valid datatype in conjunction with the
PARAMETERS declaration.

See http://msdn.microsoft.com/en-us/library/bb208916.aspx for details on the
PARAMETERS declaration, and follow the link to
http://msdn.microsoft.com/en-us/library/bb208866.aspx for valid datatypes.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sara M said:
PARAMETERS [Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]
IEEEDouble;
SELECT [3Responses].RId, [3Responses].Response, [3Responses].QuestID
FROM 3Responses
WHERE
((([3Responses].QuestID)=[Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]))
ORDER BY [3Responses].RId;

(My [QNoID] field has a "double" field size.)

Douglas J. Steele said:
So what's the entire SQL of your query now?

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Sorry. With 2ResponseFormA open, the property sheet for my subform
control
shows the source object as "2ResponseFormB" and the name as
"2ResponseFormB."

The subform within 2ResponseFormB has the source object and name of
"2ResponseFormC." My combo box that isn't populating correctly is on
2ResponseFormC.

:

I'm confused.

I asked whether you were certain that the name of the subform control
on
form 2ResponseFormA was 2ResponseFormB, and you answered

On the property sheet, it shows the source object is
"2ResponseFormC"
and
the Name is "2ResponseFormC," likewise for FormB.


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

See below.

:

The syntax you're using implies that you're trying to read the
value
contained in control QNoID on a subform of form 2ResponseFormA.

Yes, that's correct.

Are you
certain that the name of the subform control on form 2ResponseFormA
is,
in
fact, 2ResponseFormB? Depending on how you added the subform, the
name
of
the subform control may be different than the name of the form
being
used
as
a subform.

On the property sheet, it shows the source object is
"2ResponseFormC"
and
the Name is "2ResponseFormC," likewise for FormB.


I assume form 2ResponseFormA is open when you're running the query.
(Access
won't open the form for you.)

Yes, A is open. A is linked to B by "SurvID", B is linked to C by
"SurvRespID." Form A shows the basic information on the survey. Form
B
shows
the question and related comments. Form C (continuous) allows for
multiple
answers to the questions in Form B.

I can run the query separately and it works fine and pulls the
approrpriate
data. But when it is the row source for field [QNoID], I get the
Enter
parameter value message.


--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Even with the semicolon, I still get the "Enter Parameter Value"
message.

:

On Mon, 1 Feb 2010 07:15:01 -0800, Sara M
<[email protected]>
wrote:

When I change my SQL query to include your suggestion, I get
"Syntax
error in
PARAMETER clause."

My updated query, which is the row source for [RespNo] control
on
[2ResponseFormC], a subform of B:

PARAMETERS
[Forms]![2ResponseFormA]![2ResponseFormB].[Form]![QNoID]
Long

The only thing I can see is that there should be a semicolon;
after
Long.
--

John W. Vinson [MVP]
.



.



.



.


.
 
Back
Top