Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report from query

Status
Not open for further replies.

FoxGolfer

Programmer
Jul 30, 2002
100
US
I have a simple database, 5 tables, 1 master and 4 child tables, all related to the master by the same ID field. There are multiple records per child.
I have 4 subreports, one each for the child table in a master report. The subreports are "fed" from queries, based on the ID field. It runs fine EXCEPT that it requests the input of the the parameter (ID field) twice. I've checked the queries and there is no parameter (criteria) value and in the Data Relationship window, all the child tables are linked to the master table correctly.
Any help?
Thanks in advance,
Tom

 
Check for a textbox on the form that has a record source to ID Field(which doesn't exist) or unavailable fields in the Sorting & Grouping dialog.

________________________________________
Zameer Abdulla
Visit Me
A child may not be able to lift too much.
But it can certainly hold a marriage together
 
I mean on the report not form

________________________________________
Zameer Abdulla
Visit Me
A child may not be able to lift too much.
But it can certainly hold a marriage together
 
There is only one text box that lists the ID field; to display the ID for reporting purposes. It's not in the record source, it's the control source. There is no sorting and grouping.
I don't understand your response "...record source to ID Field(which doesn't exist)". ??
 
I mean to say there could be a textbox that had a controlsource earlier that(controlsSource) doesn't exist. Obviously report will ask for the controlsource when it run.
Try running the query alone also to make sure the problem is not form the query.

________________________________________
Zameer Abdulla
Visit Me
A child may not be able to lift too much.
But it can certainly hold a marriage together
 
I've checked each subreport and there is no text box that has the ID field. This is the ID query:

PARAMETERS [Enter Work Order Number] Short;
SELECT [Work Orders].WorkOrderID, [Work Orders].CustmerCode, [Work Orders].Date, [Work Orders].[Customer Name], [Work Orders].Notes1, [Work Orders].[Unit Number], Customers.[Contact Name], Customers.[Business Phone], Customers.Alternate, Customers.Address
FROM [Work Orders] INNER JOIN Customers ON [Work Orders].CustomerID = Customers.CustomerID
WHERE ((([Work Orders].WorkOrderID)=[Enter Work Order Number]));

None of the other queries for the subreports contain:
WHERE ((([Work Orders].WorkOrderID)=[Enter Work Order Number]));
I don't see where else the second prompt for the ID is coming from.
 
I can't find anything wrong in this SQL. Try removing the PARAMETERS that you have set to Integar.
Also to check the Grouping & Sorting dialog.

________________________________________
Zameer Abdulla
Visit Me
A child may not be able to lift too much.
But it can certainly hold a marriage together
 
There is nothing in the sorting/grouping dialog.
There is no parameter that is set to an integer.
Tom
 
Did you solve it? I was on vacation couldn't loggon to TT.

________________________________________
Zameer Abdulla
Visit Me
A child may not be able to lift too much.
But it can certainly hold a marriage together
 
Yes, I received a response that pointed me in the right direction. I'm a relative newbie with Access and I wasn't aware of the menu/query/parameters option. Apparently you can assign a parameter to a query there; I wasn't aware of that. I checked it, someone had entered the ID as a parameter option in there too, plus having the [ID] in the query as well; hence the multiple requests for the ID parameter.
Thanks for checking back; hope you had a nice vacation.
Tom
 
Done..


________________________________________
Zameer Abdulla
Visit Me
A child may not be able to lift too much.
But it can certainly hold a marriage together
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top