Search results

  1. L

    denominator condition in an aggregate function

    Hi, it worked. Thanks
  2. L

    two separate queries, then aggregate the output using a 3rd query or macro

    Hi, I'm not sure if this is possible, but certainly worth asking I think.. I would like to make two queries, both a count queries, which will produce two outputs. Then I envision a third query or a macro of some sort to perform simple calculation such as addition, subtraction or even...
  3. L

    denominator condition in an aggregate function

    Hi, Please help....I have this query, which is all based off of one table. It's so simple, but I can't seem to get it to work. It's a rate calculation. SELECT Count([condition_numerator]) AS [A], (select count(condition_denominator) from tbl_Record) AS [B], [A]/[B] AS [C] FROM tbl_Record WHERE...
  4. L

    Aggregate functions in SQL, add 1 condition

    Hi, I'm struggling with this aggregate function in SQL, and am wondering if someone could point me in the right direction. The code is as follows: SELECT Format(Sum(IIf(DateDiff("h",[start date],[abc_time])<=10,1,0))/Count([abc_test_done]),"Percent") AS PercentOfInterest FROM tbl_record...
  5. L

    calculating a rate

    Hi, If I also wanted to calculate this rate based on another condition, can it be done in SQL as well? Select Count(fld1) AS x , (select count(*) from MyTable ) as y , x/y as Rate from MyTable Where fld1 = "IsInterested" So the location constraint is on both the numerator and the denominator...
  6. L

    calculating a rate

    Thank you and it works perfectly.
  7. L

    decision support flag based on mulitple field values

    If I wanted to store the value, where would I put the vba code in? In the control source? The code I have written so far in the expression builder of the decision support field on the form is as follows: If [testA_done].value = "yes" AND [test 2_done].value= "yes" AND ([field A].value = "Yes"...
  8. L

    datediff function on access form. 2003. Returning "#ERROR"

    Hi guys, I made a mistake on my part here....one of the fields the formula referred to wasn't actually a date/time field. But "h" and 'h' both works! Thank you
  9. L

    % less than 72 hours, rate calculation in Access

    Hi there, I'm exploring this concept, and am seeking advice from you guys. At the end of the day, I would like to have a query that does this rate-based calculation(x/y), and show the percent of patients receiving the right care within 72 hours. x= represents the amount of record of...
  10. L

    datediff function on access form. 2003. Returning "#ERROR"

    Two bound fields on the main form, and they are start date and CBC_Test_Time. So this unbound text field will store datediff('h', [cbc_test_time],[start date]). (this is written in its control source in the expression builder). When switched to form view, it shows "#ERROR".
  11. L

    decision support flag based on mulitple field values

    I am sorry but where would you write the code? Is it in vba module. If so, undress what event shall I write it in? Or do I write the code in the control source of that decision support field? Thank you I am just not sure how to start.
  12. L

    decision support flag based on mulitple field values

    If the condition is such that field A and field B and any one of the field D or E or F has values in them? Then I would like the decision field to say "top". How do I reflect the two AndS and two Ors in one query/vba? Thank you
  13. L

    datediff function on access form. 2003. Returning "#ERROR"

    Hi yes. All fields store date and time. Format is in general date.
  14. L

    datediff function on access form. 2003. Returning "#ERROR"

    Hi there, I have an unbound textbox on the form that displays the difference between two dates. Formula is below, but when I switch to form view, the textbox shows "#ERROR". Anybody know why that might be the case? In the Expression Building, this is what I put in the "Control Source"...
  15. L

    decision support flag based on mulitple field values

    Hi there, I would like to create a field for decision support on the mainform. This field needs to say "top" when other fields in the mainform have values. (texts) So for example, field A says "Yes", field b says "Yes", and either field C or field D or field E has says "Yes" on this...
  16. L

    "is not null" doesn't work

    Hi Bob, By table level look up, did you mean looking up to the ID column(autonumber) of the referencing table? If I have to get rid of the ID column on the referencing table, I would still need to look up to the next available column on the referencing table, correct? Take my test...
  17. L

    "is not null" doesn't work

    Hi, Please see the attached. In Queries, the criteria for "hospital_type" is "Is not null";however, when the query is run, it still shows everything. The hospital_type is a lookup to another table as you can see in the relationship. this is quite puzzling as I have never ran into this...
  18. L

    "is not null" doesn't work

    Hi, I have a very simple query, just one field.....trying to test it out, but I'm not sure why it isn't working.... One column, and the criteria is "is not null". When run, the query still returns null values. The field is a look up field, but I don't know if matters or not.... Any...
  19. L

    calculating a rate

    Hi there, I have a simple query that calculates a rate. Formula is just x/y, where x represents the number of interested records, and y is the total number of record. Can this be done in the expression or in the query grid? I wonder how should the syntax go. Thanks for any comment.
  20. L

    Access report with output display mask(digits turned to letters)

    Hi there, Would it be possible to export an Access report with a column of values masked? This column contains sensitive identifying information, so I would like to somehow "hide" all the digits. So I'm thinking having some kind of code sheet (i.e. 1 = A, 2 = B, 3 = C) So the on the...
Back
Top Bottom