Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2008
    Posts
    18

    Unanswered: Access Query Prompts for a variable..dont want it to

    http://img.photobucket.com/albums/v1...essproblem.jpg

    RepairTotal prompts when run and it shouldn't since i have it assigned a value..
    THis is probably really simple and i'm not seeing it.


    THANK YOU

  2. #2
    Join Date
    Nov 2007
    Location
    Wichita, KS
    Posts
    7

    Sometimes, though I'm not quite sure why...

    Sometimes, though I'm not quite sure why, I run into the same issue. But I'd replace the [RepairTotal] in the formula for [MaxOffer] with the formula for [RepairTotal], i.e. [CMAFactor]*[CMA]-[TotalFees]-([Exttotal]+[Inttotal]). I can say that you won't have issues with the variable prompt then; you'll just have to live with the existence of a workaround in your DB. Workarounds are quite common in MS Access projects, anyway... at least, I've convinced myself of that.

  3. #3
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    The problem is that the WHERE clause is evaluated before the SELECT clause, so an alias created in the SELECT is not yet known to the WHERE. As noted by Nessalc, the fix is to recreate the calculation in the WHERE clause, rather than use the alias.
    Paul

  4. #4
    Join Date
    Mar 2008
    Posts
    18
    I did what Nessalc said but THEN it prompts for Maxoffer..
    so i replace maxoffer with it's equation and THEN it prompts for Inttotal and Exttotal..



    oh man how ridiculous, how can I get rid of things being evaluated before others

  5. #5
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Try not putting a criteria in this query. Base a second query on this one and put the criteria there.
    Paul

  6. #6
    Join Date
    Mar 2008
    Posts
    18
    aww crud
    not sure I can make a query based on a query and get the same results that I want...
    that's a new one to me

    EDIT
    it appears that writing a query based on a query based upon THIS query has solved unwanted prompt problems...
    we'll see what happens tomorrow when i put together the real final product and not just dummy variables and equations.
    Last edited by spacechimp; 04-28-08 at 00:25.

  7. #7
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I'm sure you'll go fine. Basing queries on queries is a pretty common thing to do when you have problems like that.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  8. #8
    Join Date
    Mar 2008
    Posts
    18
    Thanks PBALDY and All
    that is the solution to the problem and it works like it's suppose to


Posting Permissions

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