Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Location
    Tennessee
    Posts
    31

    Question Unanswered: Query Help Needed

    Hi all,
    Am having trouble getting my query to do what I want. The SQL below works fine:
    Code:
    SELECT DISTINCTROW 
    Sum(Contacts.[Hospital Bed]) AS [Sum Of Hospital Bd], 
    Sum(Contacts.BSC) AS [Sum Of BSC], 
    Sum(Contacts.BST) AS [Sum Of BST], 
    Sum(Contacts.[Wheel Chair]) AS [Sum Of Wheel Chair], 
    Sum(Contacts.[Elec_Wheel Chair]) AS [Sum Of Elec_Wheel Chair], 
    Sum(Contacts.[Oxygen Tank]) AS [Sum Of Oxygen Tank], 
    Sum(Contacts.[Oxygen Concentrator]) AS [Sum Of Oxygen Concentrator], 
    Sum(Contacts.[Shower  Chair]) AS [Sum Of Shower  Chair], 
    Sum(Contacts.Nebulizer) AS [Sum Of Nebulizer], 
    Sum(Contacts.Walker) AS [Sum Of Walker], 
    Sum(Contacts.[Tube Feed Pump]) AS [Sum Of Tube Feed Pump]
    FROM Contacts
    but if I want to add say a checkbox to my form that will leave out certain records in my query; I'm not sure how to do it?

    I thought that a where statement in my criteria would work; like:

    Code:
    where [Forms]![Contacts]!Check72.Enabled = False
    but it blanks out all of my data?


    Anyhelp greatly appreciated.



    G~
    The older I get, the more new stuff I tend to forget, the stuff I don't use any more...now that I remember!

    Mail Me

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    first of all, are you sure you are using MySQL? looks a lot like Access
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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