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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report/Parameter problem 1

Status
Not open for further replies.

stillwillyboy

Technical User
Jan 22, 2004
165
US
I have a report that keeps calling for the CustomerName, Address, zip code whenever I open the report. It did not used to do this. When I open the report, it should show the customer name, address and zip without me having to enter this information. This is in the page header.

If I select OK for each parameter call for the name, address, and zip code, it will eventually go thru all of the fields in the underlying query that are in the detail section. This should not happen either. All the info should appear w/o any type of parameters being used.

I’ve looked at the underlying query and there are no fields with the [ ] that call for values to a parameter. I have looked in the Query Parameters box from the menu and there are no entries.

I have a feeling that the problem is at the report level. I have looked at the properties for the report and cannot see anything that looks like a parameter call. When I change the record source, the same problem occurs.

It was working. I have no idea what I did to make it change. Any direction will be greatly appreciated.

TIA,

Bill
 
You might still have these paramater names in your 'Grouping and Sorting icon box. Open that up using the icon on the report tool bar and see if they're in there.

Otherwise, look at all the report's formulas, text boxes, text box record source contol sources, etc., etc. on your report. Those three fields are on that report somewhere, if not required in your report's query, which you said you already checked out.

Good luck.
 
I looked in the Grouping and Sorting icon box. The only entries were for the CustID, BranchID and PONumber. This is the way I want the info to be sorted.

The CustomerName, Address, zip code and all the other required fields are on the report as they are supposed to be. I have checked each ones control source (plus all the other fields) . Each has it's correct source. I can find no [] anywhere in the query or on the report.

The RecordSource for the report is correct.

Like I mentioned in my original post, I had it working.

Any help would be GREATLY appreciated.

Bill
 
Try attaching your recordsource to a new report, bring in some of your fields unto it then run it and see what happens. If it runs without the pop up paramater boxes, your problem is the report and you could just re do it. You don't have any subreport looking for these parameters, or maybe some preliminary query that is part of your final query that is your record source, with maybe the column names spelled different, do you? I'll watch for your reply.

 
Batteam, Thanks for the help. I got all but one of my parameter issues worked out. The following code is from the MS Knowledge site. I changed it a bit to work. The field/variable that is giving me trouble is the TotalUnitsPlusShipping field. Whenever I open up a new instance of Access, it asks for a value. After I click Cancel, then it runs fine. The UnitsPageSum and ShippingChargesPageSum work, (at least right now they do).

Option Compare Database
Option Explicit
Public UnitsPageSum As Double
Public ShippingChargesPageSum As Double
Public TotalUnitsPlusShipping As Double

'Enter the following code in the event procedure for the _ Print property of the detail section where <report name> _ is the name of your report, and <field name> is the name _ of the field you want to sum:

Private Sub Detail_Print(Cancel As Integer, FormatCount As Integer)
UnitsPageSum = UnitsPageSum + Reports![inv--WeeklyInvoice]![ExtendedAmount]
ShippingChargesPageSum = (ShippingChargesPageSum + Reports![inv--WeeklyInvoice]!ShippingCharges)
TotalUnitsPlusShipping = UnitsPageSum + ShippingChargesPageSum
End Sub

'Enter the following code in the event procedure for the _
Format property of the page header:

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
' reset the counter for each new page
UnitsPageSum = 0
ShippingChargesPageSum = 0
TotalUnitsPlusShipping = 0
End Sub

In my query I have: UnitsPageSum: Sum(([quantitysold]*[unitprice])) Total line is: Expression

ShippingChargesPageSum: ShippingCharges
Total line is: Sum

My report Page Footer has three fields with the control sources:
=[UnitsPageSum]
=[ShippingChargesPageSum]
=[TotalUnitsPlusShippingCharges]
This last line is the problem.

TIA

Bill



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top