Search results

  1. R

    One field, two criteria!

    You've been very helpful, thanks.
  2. R

    One field, two criteria!

    The SQL of the third query references the other two queries and not the tables, so without the other two queries the SQL below on the ASP page would not work I don't think. SELECT qryCountAll.Project, qryCountAll.CountOfID, qryCountNotEqual.CountOfID FROM qryCountAll LEFT JOIN qryCountNotEqual...
  3. R

    One field, two criteria!

    Thanks Neil very much for your example db. This does do exactly what I wanted, but I was kind of hoping to be able to construct one SQL query to insert into as ASP page, but I may have to use the two queries combined as you have written. Thanks again for your help, much appreciate.
  4. R

    COUNT query question

    I do have a thread, but I guess I was just trying to bounce off ideas with someone who was describing the same problem I was having. Apologies, and apologies to PaulT.
  5. R

    One field, two criteria!

    I did try that Neil, but you end up with one column and the results are one after another e.g. Project1 45 Project1 56 Project2 10 Project2 20 I need them in separate columns.
  6. R

    Query Help

    Yep thats right, the source for the text box would be something like =Me.Calendar.Value (this can be a hidden text box of course), then you would use Forms!frmTBA!txtTBA.text (could be .value) in the query criteria. I have done this in the past. Hope you get it working
  7. R

    Query Help

    I think you need to substitute tblData.dateandtime in the query for a reference to the Calendar value on the form. At the time of the query running, have you actually written back the date selected to the tblData ? If not then it won't work. Sorry if this sounds to simple.
  8. R

    COUNT query question

    You're describing exactly the same processes I've been going through, I also tried the crosstab wizard but to be honest I got in a bit of a mess with it, it didn't give me what I needed, but I probably did it wrong. If you succeed, I would appreciate any clues! Thanks
  9. R

    One field, two criteria!

    Thanks Neil I'm glad that you believe it should work, because I think the same, but can't fathom it! I do know that the criteria should return different results, as I have constructed a lone query which justs hooks out those values based on the same criteria but by doing it via the WHERE method...
  10. R

    COUNT query question

    This sounds extremely similar to what I'm trying to do, without much success. I need two count figures from the same table, I tried the UNION and it did the same thing for me.
  11. R

    One field, two criteria!

    Unfortunately this doesn't appear to be working for me. I have tried putting this in as an expression in my query: (my two counts that I need) ID1: DCount("[ID]","DDts_tbl") ID2: DCount("[ID]","DDTS_tbl","[When Detected]<>[When Caused]") It returns the same results for both columns though...
  12. R

    One field, two criteria!

    Thanks for your reply. I didn't want to have to do two queries, but I will look at the DCount method.
  13. R

    One field, two criteria!

    Hi there I have a table of which I need to count the instances of one of the fields. The trouble is that I need to return two different counts based on two different criteria. I don't really want to duplicate the table just to be able to achieve this, and I wanted to be able to construct it in...
Back
Top Bottom