By Passing Parameter query

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: By Passing Parameter query

  1. #1
    Board Regular
    Join Date
    May 2005
    Posts
    268
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default By Passing Parameter query

     
    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

  2. #2
    Board Regular alansidman's Avatar
    Join Date
    Feb 2007
    Location
    Steamboat Springs
    Posts
    3,990
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: By Passing Parameter query

    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.
    Alan Sidman
    Win 10--Office 2016

    Click below for a white paper on Data Base Design
    http://r937.com/relational.html



  3. #3
    Board Regular
    Join Date
    Jun 2015
    Location
    Ontario, Canada
    Posts
    1,282
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: By Passing Parameter query

    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 by Micron; Nov 18th, 2017 at 06:25 PM. Reason: clarification
    Tips for posting problems:
    1) "doesn't work" doesn't help. Post error message text/numbers and/or state what's happening.
    2) if posting code or sql, use code tags; specify on which code line errors occur, if applicable
    3) try to be specific; assume we know nothing about your issue - because we don't!

    Make all suggested changes in copies of your database or to its objects.

    "1 out of 1010 people understand binary. The other 1001 don't."

  4. #4
    Board Regular
    Join Date
    May 2005
    Posts
    268
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: By Passing Parameter query

    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

  5. #5
    Board Regular
    Join Date
    Jun 2015
    Location
    Ontario, Canada
    Posts
    1,282
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: By Passing Parameter query

    Quote Originally Posted by bearcub View Post
    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.

  6. #6
    Board Regular
    Join Date
    May 2005
    Posts
    268
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: By Passing Parameter query

      
    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.

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com