If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Query Help Needed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-27-04, 01:30
geneweaver geneweaver is offline
Registered User
 
Join Date: Dec 2004
Location: Tennessee
Posts: 31
Question 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
Reply With Quote
  #2 (permalink)  
Old 12-27-04, 10:21
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
first of all, are you sure you are using MySQL? looks a lot like Access
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On