opening report is askiing for parameter value of subreport ?

  • Thread starter graeme34 via AccessMonster.com
  • Start date
G

graeme34 via AccessMonster.com

Hi
I have an Invoice report, with control source qryInvoiceHeader (SELECT qry)
and on this report I have a subreport subrepInvLine, again the control source
is a SELECT qry
But when I try to open the report I am prompted with an input box asking for
the parameter value of the subrepInvLine. The Master/Child link is on the
despatch number. And when I try to run the querys indepently they both run
fine, each with the related despatch number in, is there any reason I am
being prompted for this parameter value?
Here are the queries:
Header:
SELECT tblAccount.AccountName, tblAccount.[Account Address 1], tblAccount.
[Account Address 2], tblAccount.[Account Address 3], tblAccount.[Account Town
/ City], tblAccount.[Post Code], tblDespatch.SalesOrderNumber, tblSalesOrder.
CustomerOrderNumber, tblSalesOrder.DeliveryMode, tblSalesInvoice.
SalesInvoiceNumber, tblDespatch.DespatchNumber, tblSalesInvoice.InvoiceDate,
tblSalesInvoice.TotalNett
FROM (tblAccount INNER JOIN tblSalesOrder ON tblAccount.AccountIndex =
tblSalesOrder.AccountIndex) INNER JOIN (tblDespatch INNER JOIN
tblSalesInvoice ON tblDespatch.DespatchNumber = tblSalesInvoice.[Despatch
Number]) ON tblSalesOrder.SalesOrderNumber = tblDespatch.SalesOrderNumber;
Detail:
SELECT tblDespatchLine.[Despatch Number], tblDespatchLine.SalesOrderNumber,
tblDespatchLine.[Quantity Sent], tblSalesOrderLine.[Product Code], tblProduct.
Description, tblSalesOrderLine.Price, [Quantity Sent]*[Price] AS [Line Total],
tblSalesOrderLine.VATRate
FROM tblProduct INNER JOIN (tblDespatchLine INNER JOIN tblSalesOrderLine ON
(tblDespatchLine.SalesOrderNumber=tblSalesOrderLine.SalesOrderNumber) AND
(tblDespatchLine.[Product Code]=tblSalesOrderLine.[Product Code])) ON
tblProduct.[Product Code]=tblSalesOrderLine.[Product Code];
Thank you!
 
G

graeme34 via AccessMonster.com

Its Ok the report works fine ......I must nt have saved the queries after
altering them to the correct method...
graeme34 said:
Hi
I have an Invoice report, with control source qryInvoiceHeader (SELECT qry)
and on this report I have a subreport subrepInvLine, again the control source
is a SELECT qry
But when I try to open the report I am prompted with an input box asking for
the parameter value of the subrepInvLine. The Master/Child link is on the
despatch number. And when I try to run the querys indepently they both run
fine, each with the related despatch number in, is there any reason I am
being prompted for this parameter value?
Here are the queries:
Header:
SELECT tblAccount.AccountName, tblAccount.[Account Address 1], tblAccount.
[Account Address 2], tblAccount.[Account Address 3], tblAccount.[Account Town
/ City], tblAccount.[Post Code], tblDespatch.SalesOrderNumber, tblSalesOrder.
CustomerOrderNumber, tblSalesOrder.DeliveryMode, tblSalesInvoice.
SalesInvoiceNumber, tblDespatch.DespatchNumber, tblSalesInvoice.InvoiceDate,
tblSalesInvoice.TotalNett
FROM (tblAccount INNER JOIN tblSalesOrder ON tblAccount.AccountIndex =
tblSalesOrder.AccountIndex) INNER JOIN (tblDespatch INNER JOIN
tblSalesInvoice ON tblDespatch.DespatchNumber = tblSalesInvoice.[Despatch
Number]) ON tblSalesOrder.SalesOrderNumber = tblDespatch.SalesOrderNumber;
Detail:
SELECT tblDespatchLine.[Despatch Number], tblDespatchLine.SalesOrderNumber,
tblDespatchLine.[Quantity Sent], tblSalesOrderLine.[Product Code], tblProduct.
Description, tblSalesOrderLine.Price, [Quantity Sent]*[Price] AS [Line Total],
tblSalesOrderLine.VATRate
FROM tblProduct INNER JOIN (tblDespatchLine INNER JOIN tblSalesOrderLine ON
(tblDespatchLine.SalesOrderNumber=tblSalesOrderLine.SalesOrderNumber) AND
(tblDespatchLine.[Product Code]=tblSalesOrderLine.[Product Code])) ON
tblProduct.[Product Code]=tblSalesOrderLine.[Product Code];
Thank you!
 

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