Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2007
    Posts
    40

    Unanswered: What's Wrong with this code? - Parameter Prompt

    I've the following code inside a query called "Bobs"
    Code:
    JOB: IIf (Jobmain.receipt = Bobs.receipt, Jobmain.job,"Job entry not given")
    But it kicks up a "Enter Parameter Value" for "Bobs.Receipt" but if I just put [Receipt] it tells me it can refer to more than one table listed in the FROM clause.

  2. #2
    Join Date
    May 2009
    Posts
    258
    What table does the receipt field in the Bobs query come from? You can't fully qualify the field based on the query name, it has to be a table name.

    Ax

  3. #3
    Join Date
    Dec 2007
    Posts
    40
    DOH!

    [Receipt] from Bobs comes from a Table called AllRecHead. Changing the code to this
    Code:
    JOB: IIf(Jobmain.Receipt=AllRecHead.Receipt,Jobmain.Job,"Job entry not given")
    gives a parameter prompt on JobMain.Receipt though. Jobmain is another query but one I HAVE to have to give me the result (Jobmain.Job).

    Does that mean I can't refer to another query like this?

  4. #4
    Join Date
    May 2009
    Posts
    258
    As long as you have Jobmain in the FROM clause, it should be fine I think.

Posting Permissions

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