Parameter name?

G

Guest

I was wondering if anyone could tell me if there’s any significance with the
A at the end of frmYardSalesSubformA in the following:

SELECT tblUsers.*, tblYardSales.*
FROM tblUsers INNER JOIN tblYardSales ON tblUsers.CustomerID =
tblYardSales.CustomerID
WHERE (((tblUsers.CustomerID)=[forms]![frmYardSales2]![customerid]) AND
((tblYardSales.SalesID)=[Forms]![frmYardSales2]![frmYardSalesSubformA].[Form]![SalesID]));

I created a button to print a form for a person buying a license to have a
yard sale. The criteria is the above. It’s so weird. There’s not a subform
anywhere I can find that’s named YardSalesSubformA. I’ve looked in every
query, every tab on the properties of a form, all throughout VB and I can not
find any reference to YardSalesSubformA. But, if I take the A out and use
YardSalesSubform, which is the real name of the form, in the query/criteria
it asks me for the parameter
“[Forms]![frmYardSales]![frmYardSalesSubform].[Form]![SalesID]â€. However, if
I include the A, it works fine. But there is no YardSalesSubformA anywhere!
So, what’s up with the A? Does it have to be there? Is there somewhere else I
could look to find a reference for it that I’m missing? I know that usually
when I get that parameter question, it’s because there’s an incorrect name in
a query. I got it on CustomerID first because it was different in the
program I copied the code to, but when I fixed that it went away and then
this one for YardSalesSubform came up. I can't find a reference anywhere to
the YardSalesSubformA. In both programs, the original and the one I'm
copying stuff to, with the A, it works just fine, without it I get the
parameter question. Any help would be very much appreciated.

Thanks,
Randy M
 
P

Pieter Wijnen

Simple: Your Form Control is Called "frmYardSalesSubformA" and must not be
confused with the form "frmYardSalesSubform"
It would however be easier to give the control the same name as the form? to
avoid confussion

Pieter
 
G

Guest

Pieter, I figured it was something simple, but the problem is I'm new to
Access and I'm still finding my way. I thought I knew how to find the Form
Control but evidently I don't because I couldn't. I thought if I clicked on
the box at the top left of the form that would select the form and then I
could find it in the properties, but that didn't work. Could you please tell
me how to find the Form Control?
Thanks,
Randy M

Pieter Wijnen said:
Simple: Your Form Control is Called "frmYardSalesSubformA" and must not be
confused with the form "frmYardSalesSubform"
It would however be easier to give the control the same name as the form? to
avoid confussion

Pieter

WCDoan said:
I was wondering if anyone could tell me if there's any significance with
the
A at the end of frmYardSalesSubformA in the following:

SELECT tblUsers.*, tblYardSales.*
FROM tblUsers INNER JOIN tblYardSales ON tblUsers.CustomerID =
tblYardSales.CustomerID
WHERE (((tblUsers.CustomerID)=[forms]![frmYardSales2]![customerid]) AND
((tblYardSales.SalesID)=[Forms]![frmYardSales2]![frmYardSalesSubformA].[Form]![SalesID]));

I created a button to print a form for a person buying a license to have a
yard sale. The criteria is the above. It's so weird. There's not a subform
anywhere I can find that's named YardSalesSubformA. I've looked in every
query, every tab on the properties of a form, all throughout VB and I can
not
find any reference to YardSalesSubformA. But, if I take the A out and use
YardSalesSubform, which is the real name of the form, in the
query/criteria
it asks me for the parameter
"[Forms]![frmYardSales]![frmYardSalesSubform].[Form]![SalesID]". However,
if
I include the A, it works fine. But there is no YardSalesSubformA
anywhere!
So, what's up with the A? Does it have to be there? Is there somewhere
else I
could look to find a reference for it that I'm missing? I know that
usually
when I get that parameter question, it's because there's an incorrect name
in
a query. I got it on CustomerID first because it was different in the
program I copied the code to, but when I fixed that it went away and then
this one for YardSalesSubform came up. I can't find a reference anywhere
to
the YardSalesSubformA. In both programs, the original and the one I'm
copying stuff to, with the A, it works just fine, without it I get the
parameter question. Any help would be very much appreciated.

Thanks,
Randy M
 
P

Pieter Wijnen

Simplest way is to TAB Around on the main form
in newer versions of Access it's often a pain in the neck to get hold of the
control instead of the subform

opening the subform (normal view) before opening the main form (design view)
is another way

HTH

Pieter

WCDoan said:
Pieter, I figured it was something simple, but the problem is I'm new to
Access and I'm still finding my way. I thought I knew how to find the Form
Control but evidently I don't because I couldn't. I thought if I clicked
on
the box at the top left of the form that would select the form and then I
could find it in the properties, but that didn't work. Could you please
tell
me how to find the Form Control?
Thanks,
Randy M

Pieter Wijnen said:
Simple: Your Form Control is Called "frmYardSalesSubformA" and must not
be
confused with the form "frmYardSalesSubform"
It would however be easier to give the control the same name as the form?
to
avoid confussion

Pieter

WCDoan said:
I was wondering if anyone could tell me if there's any significance
with
the
A at the end of frmYardSalesSubformA in the following:

SELECT tblUsers.*, tblYardSales.*
FROM tblUsers INNER JOIN tblYardSales ON tblUsers.CustomerID =
tblYardSales.CustomerID
WHERE (((tblUsers.CustomerID)=[forms]![frmYardSales2]![customerid]) AND
((tblYardSales.SalesID)=[Forms]![frmYardSales2]![frmYardSalesSubformA].[Form]![SalesID]));

I created a button to print a form for a person buying a license to
have a
yard sale. The criteria is the above. It's so weird. There's not a
subform
anywhere I can find that's named YardSalesSubformA. I've looked in
every
query, every tab on the properties of a form, all throughout VB and I
can
not
find any reference to YardSalesSubformA. But, if I take the A out and
use
YardSalesSubform, which is the real name of the form, in the
query/criteria
it asks me for the parameter
"[Forms]![frmYardSales]![frmYardSalesSubform].[Form]![SalesID]".
However,
if
I include the A, it works fine. But there is no YardSalesSubformA
anywhere!
So, what's up with the A? Does it have to be there? Is there somewhere
else I
could look to find a reference for it that I'm missing? I know that
usually
when I get that parameter question, it's because there's an incorrect
name
in
a query. I got it on CustomerID first because it was different in the
program I copied the code to, but when I fixed that it went away and
then
this one for YardSalesSubform came up. I can't find a reference
anywhere
to
the YardSalesSubformA. In both programs, the original and the one I'm
copying stuff to, with the A, it works just fine, without it I get the
parameter question. Any help would be very much appreciated.

Thanks,
Randy M
 
G

Guest

Thanks so much Pieter. That did it! That was the only place I hadn't looked
and I didn't know to look there. I never would have found it without your
help. Thanks so much. One fire put out, many more to go.

Randy M

Pieter Wijnen said:
Simplest way is to TAB Around on the main form
in newer versions of Access it's often a pain in the neck to get hold of the
control instead of the subform

opening the subform (normal view) before opening the main form (design view)
is another way

HTH

Pieter

WCDoan said:
Pieter, I figured it was something simple, but the problem is I'm new to
Access and I'm still finding my way. I thought I knew how to find the Form
Control but evidently I don't because I couldn't. I thought if I clicked
on
the box at the top left of the form that would select the form and then I
could find it in the properties, but that didn't work. Could you please
tell
me how to find the Form Control?
Thanks,
Randy M

Pieter Wijnen said:
Simple: Your Form Control is Called "frmYardSalesSubformA" and must not
be
confused with the form "frmYardSalesSubform"
It would however be easier to give the control the same name as the form?
to
avoid confussion

Pieter

I was wondering if anyone could tell me if there's any significance
with
the
A at the end of frmYardSalesSubformA in the following:

SELECT tblUsers.*, tblYardSales.*
FROM tblUsers INNER JOIN tblYardSales ON tblUsers.CustomerID =
tblYardSales.CustomerID
WHERE (((tblUsers.CustomerID)=[forms]![frmYardSales2]![customerid]) AND
((tblYardSales.SalesID)=[Forms]![frmYardSales2]![frmYardSalesSubformA].[Form]![SalesID]));

I created a button to print a form for a person buying a license to
have a
yard sale. The criteria is the above. It's so weird. There's not a
subform
anywhere I can find that's named YardSalesSubformA. I've looked in
every
query, every tab on the properties of a form, all throughout VB and I
can
not
find any reference to YardSalesSubformA. But, if I take the A out and
use
YardSalesSubform, which is the real name of the form, in the
query/criteria
it asks me for the parameter
"[Forms]![frmYardSales]![frmYardSalesSubform].[Form]![SalesID]".
However,
if
I include the A, it works fine. But there is no YardSalesSubformA
anywhere!
So, what's up with the A? Does it have to be there? Is there somewhere
else I
could look to find a reference for it that I'm missing? I know that
usually
when I get that parameter question, it's because there's an incorrect
name
in
a query. I got it on CustomerID first because it was different in the
program I copied the code to, but when I fixed that it went away and
then
this one for YardSalesSubform came up. I can't find a reference
anywhere
to
the YardSalesSubformA. In both programs, the original and the one I'm
copying stuff to, with the A, it works just fine, without it I get the
parameter question. Any help would be very much appreciated.

Thanks,
Randy M
 

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