Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Parameter Error (2002)

    Hi!

    Just when I think I have an area of Access down....................... <img src=/S/bouncenburn.gif border=0 alt=bouncenburn width=31 height=31>

    I have a query that is returning exactly what I want however I'm getting two parameter errors. The query contains [entry_date] and [txtStartDate]. I have a field which calculates the year for both called [enteryYear] and [startdateyear]. This works fine. It is when I put in a nested if field that I get prompted for parameters. I set the parameters for each and tried setting them as date, text, long integer. Nothing works. After the parameter errors the query returns what I want. How do I get past the errors?

    BTW, the statement that is causing the parameter questions is:

    PastPresentDefined: IIf([EntryYear]<[startdateyear],"Past","Present")

    Thanks,
    Leesha

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Parameter Error (2002)

    You're introducing one level too many in the query. Replace [EntryYear] with the expression that defines it, perhaps Year([entry_date]), and do the same for [startdateyear].

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Parameter Error (2002)

    Thanks Hans! I didn't know I could do that. I thougtht I had to define year first and didn't realize I could do it directly in the statement. Worked like a charm.

    Thanks for the explanation!

    Leesha

Posting Permissions

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