Unwanted "Enter Parameter Value" pop-up box when opening report

  • Thread starter John S. Ford, MD
  • Start date
J

John S. Ford, MD

I'm using Access 2000 and have a form with a command button that opens a
report using the Docmd.OpenReport method.

When doing so, an "Enter Parameter Value" pop-up box opens asking for a
mystical parameter "PatientRoomNumber". If I leave it blank and click it,
the report opens perfectly.

I'm sure that this parameter is a variable or field name I've long since
deleted or changed. The problem is that I can't locate it ANYWHERE in my
database. I've checked every line of VBA code, I've gone through every one
of my queries and tables and can't find it anywhere.

How can I get rid of this annoying pop-up and what's causing it?

Frustratingly Yours,
John
 
G

GeoffG

Hi John,

The mystery field is somewhere in the report.

(1) Check the report's Sorting and Grouping dialog. Is it a old
field on which grouping or sorting was being performed.

(2) Check the report's RecordSource property. Does it contain a
SELECT statement that refers to the old field
"PatientRoomNumber"?

(1) and (2) above are the usual culprits. If not those, focus on
the report. It's in there somewhere (perhaps in the Control
Source property of a control; not so sure about that; just a
thought).

Regards
Geoff
 
T

Tom Wickerath

Hi John,

First, open the report in design view. Click on View | Properties to display
the Properties dialog if it is not already displayed. With the Report
selected (you should see Report in the blue title bar of the Properties
dialog), click on the Data tab. If the recordsource is a query or SQL
statement, click the Build (...) button to open the query designer. Run the
query. Do you get the same parameter prompt? If yes, the problem is
somewhere in the query that serves as the recordsource for your report.

If the query runs fine,
1.) Do you have anything specified in the Filter on the Data tab, right
below the Record Source?

2.) On the Events tab, are you calling out any macros? If so, do all of
these macros run without producing this parameter prompt?

3.) Click on View | Sorting and Grouping. Is there any reference in the
Field/Expression list for your parameter prompt?

If you still cannot find it, try documenting this report. To do so, click on
Tools | Analyze | Documenter. Select the report in question. If this report
includes any subreports, then select those as well. Click on the Option...
button in the lower right corner of the Documenter dialog. Add checks to the
first three options (Properties, Code, and Permissions by User and Group).
Select Names and Properties in the lower section. Click on OK to dismiss this
dialog. Then click on OK one more time to run the analysis. This should bring
up a report when finished. Do not close the report just yet. Instead, click
on File | Export, and save this report as a rich text file by making the
appropiate selection in the Save As Type dialog.

Open the resulting rich text file in WordPad (or Word if you wish). Search
for the occurance of the string "PatientRoomNumber" (without the quotes, of
course). If you still cannot find it, then repeat the documentation, except
this time select every object in your database. Then export it once again to
rich text, and repeat the search. It's in there somewhere....


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________
 
J

John S. Ford, MD

Dear Tom,

It was the "View | Sorting and Grouping" that fixed it. It was there all
right. Thanks much!

John
 
J

John S. Ford, MD

Proving once again that a little medical background is a dangerous (and
amusing) thing!

John
 

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