By Passing Parameter query

bearcub

Well-known Member
Joined
May 18, 2005
Messages
734
Office Version
  1. 365
  2. 2013
  3. 2010
  4. 2007
Platform
  1. Windows
I have a field that keeps on popping up when I run a report that behaves like a parameter query (where you have enter in the text box the value you want displayed). However, I don't have a parameter query running in my query in that field. It looks like phanthom parameter query. I redid the report and query but I'm getting the same results. Do you know what could cause this to happen?

thank you for your help,

Michael
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I suspect that you have designated a field in your query that does not exist in the table you are querying. Double check all the fields in your query to make sure you don't have a random orphan.
 
Upvote 0
Run the query for the report. If it doesn't prompt but you get the prompt when you open the report, the problem is on the report. In that case, a control probably references a field that doesn't exist in the query (could be just a spelling error) or you may have renamed a query field after creating the report. Or you have a calculated control in the report and the expression was typed in but references a field that doesn't exist.

If you do get the prompt when running the query alone, then as noted, the query may contain a field that doesn't exist in a table. More likely, you have a calculated field in the query and the expression has the same problem as I noted above for the report.
 
Last edited:
Upvote 0
I'm not at work but I think the prompt only came up when I ran the report, not the query. I do recall I had a control with that name but I think I renamed it or deleted it all together. I'll have to check the controls more thoroughly next week.

Is there a macro that would prevent this prompt from occurring - like it this prompt shows up, ignore it? is there a VBA object or property that could be called to if this happens by pass it?

Thank you for your help,

Michael
 
Upvote 0
Is there a macro that would prevent this prompt from occurring - like it this prompt shows up, ignore it? is there a VBA object or property that could be called to if this happens by pass it?
I think not. First of all, it's not an error, and errors are what you're able to suppress or handle differently. This is a prompt for what Access treats as a parameter that can't be resolved. Even if there was such a thing, it would often be a bad idea. If it were a parameter and you didn't respond to it because you suppressed the request for input, the null or empty string (not sure which) that you'd pass would result in no records in most (all?) cases. What you're asking for is a way to ignore a flaw in the report design, which is highly unconventional, IMHO.

You will probably find that the control is misnamed (since you say the query runs fine by itself) rather than is missing. If it were missing, there'd be a field returned by the query which simply isn't being used by the report, which is fine - unless as noted previously, a calculated control on the report references the missing or misnamed control.
 
Upvote 0
Thank you- that makes sense. I look at the controls again and find out where it started. If I can't find it, Ill just rebuild the report and sees what happens.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top