Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2007
    Posts
    16

    Unanswered: 'Enter Parameter Value'

    I need to create output for the number of properties that have been sold for each property type e.g.

    Detached 2
    Terrace 1
    Semi-Detached 2

    I've created a sub query as follows:

    SELECT *
    FROM SaleProperty
    WHERE Status IN (SELECT COUNT (Status)
    FROM SaleProperty
    WHERE Status
    GROUP BY Type);

    Status means whether the properties are sold or not
    I'm grouping by the property type e.g. terraced, detached

    When I want to run it, a pop up box appears telling me to enter a parameter value. What does that mean?

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    It means that the query cannot obtain the value of a certain field or criteria. I'd highly recommend you avoid using a field called: status (or a field called: type). These are most likely reserved words and will give you problems at some point if it's not the problem here. I'd perhaps recommend: SaleStatus/PropertyType.
    Last edited by pkstormy; 12-10-07 at 16:23.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    It's probably asking that because of your where statement
    WHERE STATUS ???

    However
    Looks like status is a yes/no type field, so the value is -1 or 0.
    Select count(status).... will probably yield a number much different than -1 or 0.

    SELECT COUNT (Status)
    FROM SaleProperty
    WHERE Status
    GROUP BY Type
    could yield the result '27'

    So your query could end up trying to evaluate:

    SELECT *
    FROM SaleProperty
    WHERE Status IN (27);
    Inspiration Through Fermentation

Posting Permissions

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