Go Back   Access World Forums > Microsoft Access Reference > Access FAQs

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-25-2014, 08:36 AM   #1
cnstarz
Newly Registered User
 
Join Date: Mar 2013
Posts: 89
Thanks: 8
Thanked 5 Times in 4 Posts
cnstarz is on a distinguished road
Things to look for when a Report mysteriously asks for parameter

TL;DR: Make sure to check conditional formatting rules that reference old field names that are renamed.

Long Story: In my infinite wisdom when I first started creating this database, I created fields named "Date" in some tables and queries. It wasn't until a few weeks that minor bugs started popping up because of my excellent choice in names. This weekend, I finally decided to just come into work to rename all the fields called "Date" throughout all my tables and queries. After a few hours of going doing that and updating all my forms, queries, reports and vba code, I was finally done! Everything appeared to work smoothly except for one report that was still asking for a Parameter for a field called "Date".

First thing I checked was the Record Source of the report. I checked the query (which is actually a Union Query) to ensure it wasn't the query asking for the parameter... nope the union query opens fine. Just to be safe, I also checked the two queries that the union query combines. I checked all fields for both queries, filter and order by settings for both queries, checked all criterias for both queries, I even checked the Parameter Settings for both queries. Nothing was referencing a field called "Date".

Okay, it must be something with the report then. I checked the filter and order by settings for the report, I checked the control source for all fields, I checked the VBA code to make sure there wasn't anything there referencing a "Date" field. Nada, nothing. THEN -- a lightbulb turned on! I got up and turned it off because I dont like wasting electricity. Also, I must have ghosts in my house. Actually, I remembered about Grouping and Sorting! HA FOUND IT -- not. My Report isn't grouped or sorted.

I was frustrated. I scoured the intrawebs to see what others had say about the mysterious Parameter being asked about. Most everyone was able to fix their problems by adjusting their Group and Sort because it's a commonly-overlooked feature. Not me though! No, my report is smarter than that. In my frustration, I decided to delete each field one at a time to see if it would stop asking for this stupid parameter. I had one field left and it still asked for the stupid parameter. What are the chances that this last random field is still reliant on this old field name? I deleted the field and the report loaded fine. So, it doesn't ask for the parameter when there's nothing in the details part of the report, but it does ask for it when any of my fields are present. Fhat the wuck, man?

After a few hours of pulling my hair out, I decided to just delete each field and recreate them all. That worked. I recreated all the fields on my report and now it doesn't ask for any parameters. Weird huh?

I came into work this morning only to find out that other things with the database needed addressed that I didn't address over the weekend. Then I got a complain that certain fields on that report aren't changing colors when they're supposed to. Hmmm, conditional formatting is broken for some reason. Ohhhhh, yeah totes forgot to add conditional formatting to those fields after I recreated them. WAIT A SECOND... CONDITIONAL FORMATTING...

None of my new fields had the conditional formatting that the old fields had. I opened up a backup of the database to look at the conditional formatting of those fields... WINNER WINNER CHICKEN DINNER. I had conditional formatting referencing a "Date" field.

So, if you run into this problem where a report is asking for a parameter after you named a field:
- Check all query fields, query parameters, query SQL, query sorts and filters
- Check all Report sorts, groupings, filters, and conditional formatting rules
- Check all Report field record sources, default values, formats, Hyperlink Targets
- Check all VBA code that is referencing the field's old name

Hopefully this post can save someone hours of wasted time. Thank you for reading.

cnstarz is offline   Reply With Quote
The Following 2 Users Say Thank You to cnstarz For This Useful Post:
hassanogaibi (06-28-2016), Tera (07-14-2019)
Old 08-26-2014, 12:32 AM   #2
RainLover
VIP From a land downunder
 
RainLover's Avatar
 
Join Date: Jan 2009
Location: Qld Australia
Posts: 5,044
Thanks: 28
Thanked 517 Times in 492 Posts
RainLover will become famous soon enough
Re: Things to look for when a Report mysteriously asks for parameter

Quote:
Originally Posted by cnstarz View Post
TL;DR: Make sure to check conditional formatting rules that reference old field names that are renamed.
Long Story:
After a few hours of pulling my hair out, I decided to just delete each field and recreate them all. That worked. I recreated all the fields on my report and now it doesn't ask for any parameters. Weird huh?
What you did here was the SMART thing to do. Please read the original post in Full.
Deleting one object at a time may be tedious however you will find the fault.
Just remember to back up often.
__________________
Regards Rain.

Windows 7. Access 2003. East Coast Australia. GMT +10,

RainLover is offline   Reply With Quote
The Following User Says Thank You to RainLover For This Useful Post:
hassanogaibi (06-28-2016)
Old 08-26-2014, 02:37 PM   #3
Galaxiom
Super Moderator
 
Join Date: Jan 2009
Location: NSW Australia
Posts: 11,605
Thanks: 89
Thanked 1,492 Times in 1,408 Posts
Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold Galaxiom is a splendid one to behold
Re: Things to look for when a Report mysteriously asks for parameter

Anyone looking for particular expressions in a database should install V-Tools.

The Total Deep Search is very good.

Galaxiom is offline   Reply With Quote
The Following User Says Thank You to Galaxiom For This Useful Post:
hassanogaibi (06-28-2016)
Old 09-28-2014, 07:59 PM   #4
accedeholdings
Newly Registered User
 
Join Date: Sep 2014
Posts: 15
Thanks: 3
Thanked 3 Times in 3 Posts
accedeholdings is on a distinguished road
Re: Things to look for when a Report mysteriously asks for parameter

Thank you Galaxiom for the suggestion. That is just what I needed.
accedeholdings is offline   Reply With Quote
The Following User Says Thank You to accedeholdings For This Useful Post:
hassanogaibi (06-28-2016)
Old 07-14-2019, 11:06 AM   #5
statsman
Newly Registered User
 
statsman's Avatar
 
Join Date: Aug 2004
Location: Toronto ON
Posts: 2,074
Thanks: 4
Thanked 3 Times in 3 Posts
statsman will become famous soon enough
Re: Things to look for when a Report mysteriously asks for parameter

Check your spelling.
It's amazing how often that's the problem.
__________________
Dart players always have a point.
statsman is offline   Reply With Quote
Old 07-14-2019, 03:38 PM   #6
MajP
Newly Registered User
 
Join Date: May 2018
Location: USA baby
Posts: 1,785
Thanks: 34
Thanked 538 Times in 511 Posts
MajP will become famous soon enough MajP will become famous soon enough
Re: Things to look for when a Report mysteriously asks for parameter

The one that gets me is the Order By or Filter By property. I usually set those in code, but during desingn they can get saved.
MajP is online now   Reply With Quote
The Following User Says Thank You to MajP For This Useful Post:
Uncle Gizmo (07-14-2019)
Old 07-14-2019, 03:43 PM   #7
CJ_London
Super Moderator
 
Join Date: Feb 2013
Location: UK
Posts: 11,237
Thanks: 40
Thanked 3,644 Times in 3,514 Posts
CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light CJ_London is a glorious beacon of light
Re: Things to look for when a Report mysteriously asks for parameter

particularly for five year old posts


__________________
CJ_London
_______________________
A little thanks goes a long way. If you have found this post useful, please tick the thanks button
CJ_London is online now   Reply With Quote
The Following User Says Thank You to CJ_London For This Useful Post:
Uncle Gizmo (07-14-2019)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Query asks for Parameter values loubnabouayad Queries 1 04-06-2014 04:13 PM
OpenForm asks for parameter value alexandria Modules & VBA 2 05-15-2011 12:04 PM
Function asks for parameter accessma Forms 15 03-09-2008 04:45 PM
Forms asks for Parameter Taff Forms 5 02-13-2004 07:52 AM




All times are GMT -8. The time now is 03:17 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World