Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2015
    Posts
    31

    Answered: Query expression keeps asking Parameter Value

    Hello everyone,

    I need some help with an expression that i've been given to me which i'm trying to adapt to my data base. However, each time i run the query there are several questions that appear for the Parameter Value even though i never set anything of such.

    diag anomalie: IIf(Left([010- Extraction + champs calculé]![Réclamation];2)="AC";"voir planning AC";IIf([010- Extraction + champs calculé]![Act]="f00";"Atelier Rapide";IIf((IsNull([010- Extraction + champs calculé]![Fin Prévue]) And [010- Extraction + champs calculé]![StkDisp]=0 And [010- Extraction + champs calculé]![Promise Date]<Now());"A solder?";IIf([7-15-38 Livraisons]![Reste à livrer]<[010- Extraction + champs calculé]![StkDisp];"En Stock";IIf([010- Extraction + champs calculé]![StkDisp]>0;"Stock partiel";IIf([010- Extraction + champs calculé]![OF]<>[010- Extraction + champs calculé]![PremierDeOF];"Changement d'OF";IIf(Left([010- Extraction + champs calculé]![En Chg];2)="NC";"NC";IIf(Left([010- Extraction + champs calculé]![Réclamation];2)="MQ";"MQ";IIf([7-15-38 Livraisons]![Reste à livrer]>[010- Extraction + champs calculé]![QtéOF];"Qté OF insuffisant";"ok")))))))))

    Where am i going wrong ?

    Many thanks

  2. Best Answer
    Posted by myle

    "Put [] around Feilds and Tables

    so [table1].[feildname]

    Next time you have to build a Table NO SPACE IN THE FEILD NAMES"


  3. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    The usual reason for getting a prompt askibg for a parameter is that the SQL engine interprets a value in your query as such. Usually thats becuase youve referred to a column in the select that doesnt exist or is mistyped.
    it could also be a problem if you use reserved words or symbols.
    usually when requesting parametervalues the SQL engine will tell you which elements it wants a parameter value, using the element it doesnt recognise as a prompt. So wotwork through the query, resolve each error one by one.
    Also i find debugging queries containg IIF's easier to do element by element, start with a single IIF and then build up once each IIF block is proven to do what you expect
    im still struggling to get to grips with using a semi colon as a column separator in a SQL statement. Given that yhe semi colon has a specific meaning in SQL (end of statement) its not something i would expect to be permitted as replacement for the usual comma
    I'd rather be riding on the Tiger 800 or the Norton

  4. #3
    Join Date
    Mar 2015
    Posts
    31
    Thank you for the advice.
    I've managed to do some digging and there were a few errors for the fields. However, there is still one remaining parameter which is at the beginning, i don't think there is anything wrong with the expression so am i right in thinking that the value that is being searched can't be found/interpreted by Access?
    Here's the part that is causing troubles
    diag anomalie: IIf(Left([006- OF le + avancé]![Réclamation];2)="AC";"voir planning AC";

    What do i use instead of a semi colon ? I work for a french company so changing from computers also changes ther language depending on the computer.

  5. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so the first thng to check is that there is genuinely a column called Réclamation in the table 006- OF le + avancé
    you may need to it as:-
    [006- OF le + avancé].[Réclamation]
    as Im nto too certain that the ! notation is supported in a query.
    https://www.google.co.uk/webhp?sourc...between+!+and+.
    I'd rather be riding on the Tiger 800 or the Norton

  6. #5
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,424
    Provided Answers: 8
    Put [] around Feilds and Tables

    so [table1].[feildname]

    Next time you have to build a Table NO SPACE IN THE FEILD NAMES
    hope this help

    See clear as mud


    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB based on my own environment: vb6 sp5
    ASP based on my own environment: 5.6
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    MYLE
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.

Posting Permissions

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