Search results

  1. M

    help needed with Nz() and vba coding

    and also, query shows all data and ordered by month, how to display data for specific month? my report looks like this: ------------------jan---- feb---- mar All QA [value] [value][value][value] All QI [value] [value][value][value] severity [value] [value][value][value]
  2. M

    help needed with Nz() and vba coding

    Frothingslosh & namliam woooooooow this is sooooo fast and so simple, left me speechless, massive THANK YOU to both of you. I want your brains :) I need to create another query, where user selects a department from combo, how to add it to this line: , count(qaQualityIncidentNo) as...
  3. M

    help needed with Nz() and vba coding

    Hello, I am still stuck on this one. Can anyone advice on how to create the SQL to make it run faster, please. Thank you kindly
  4. M

    help needed with Nz() and vba coding

    oh I see, I have created a form and pasted your SQL into the record source, but it comes with an error, Wrong number of arguments used with function with query expression: "sum(iif(qaSeverity=True),1,0) as SeverityTrue" unsure of what to do next.
  5. M

    help needed with Nz() and vba coding

    Namliam, I'm sorry but just simply don't know. Where exctly do I need to insert this code? I'm thinking of text box on event and then create private sub ...
  6. M

    help needed with Nz() and vba coding

    Wooooow I'm already excited, will try it tonight. Thanks for that :)
  7. M

    help needed with Nz() and vba coding

    Have 2 queries, but they count different records, just displayed on the same form thats why i said 2 queries, but to begin with I would like to start with the first one, create a report and then go to the second one. query has: 1. ID 2. date 3. text field A 4.yes/no field 5. text field B(number...
  8. M

    help needed with Nz() and vba coding

    ok, changed my mind, going to use a report to display all my Dcounts, based on 2 queries. Any suggestion on how to make it work quickly before I start, please.
  9. M

    help needed with Nz() and vba coding

    Ok. I am willing to try anything. As long as it works correctly and quickly. :) What shall I do next then?
  10. M

    help needed with Nz() and vba coding

    Yes, it's in the rowsource. But if we create a function we going to go back to where we started. It's going to be slow. I want to speed it all up like namliam suggested. Shall we use a query then? I don't know what's better or faster. And don't know how to start on either of them.
  11. M

    help needed with Nz() and vba coding

    smig, where do I insert it? in an event of the textbox? Feeling confused :/
  12. M

    help needed with Nz() and vba coding

    I use 2 queries, so I believe I would benefit if i convert to SQL (which I never used before). Would you please be able to point me to some kind of HOWTO, or give me any instructions on where to start. Thank you
  13. M

    help needed with Nz() and vba coding

    I didn't know, Dcount will slow me down. I have approx 100 dcount expressions on my form. I've done a little read and others say even if I replace them with something else it won't make any difference in time as it's a single form. Obviously I don't want users to wait 20 seconds or longer for...
  14. M

    help needed with Nz() and vba coding

    Well, yes you are right. I am stuck here: I don't understand what to do. Is it: IIf(Nz()Dcount())/IIf(Nz()Dcount()) ?? I tried this: =IIf(Nz([cboDeptStats],0)=0,0,DCount("tTaskPK","Q_task_CompStats","tTaskDueDate>=tTaskComplDate AND Month([tTaskDueDate]) = 6 AND...
  15. M

    help needed with Nz() and vba coding

    I don't know how to do it. Can you help me please.
  16. M

    help needed with Nz() and vba coding

    Thanks JHB, used Dcount and it works like a dream! Private Sub cmdPrintActions_Click() 'Print Actions for current record using R_printQA. Dim i As Integer i = DCount("*", "Q_printTask", "tQAFK=qaQAPK") 'MsgBox "The count of rows is " & i If i = 0 Then MsgBox "No Records available for print", _...
  17. M

    help needed with Nz() and vba coding

    Good day all, I have been trying to resolve those 2 problems, but so far unsuccessful, probably didn't asked the right question. Would appreciate your kind help. Problem 1. The following code was showing #num! if [cboDeptStats] was left blank, after I added the iff(Nz.. function to what I used...
  18. M

    Using the COUNT function on a sub form which is based on a query

    why don't you post your function here? my one works, no matter if I place it in footer or elsewhere: =DCount("NameOfFieldYouWantToCount","NameOfQuery") or one with criteria =DCount("fieldName","QueryName","AnotherField=True AND OtherField=[Forms]![FormName]![cboFieldName]")
  19. M

    How to correctly filter records?

    Gina, Thank you for all your input. Your help is greatly appreciated! :)
  20. M

    How to correctly filter records?

    ok so would this work: Select Case cboIsClosed Case 1 strWhere = strWhere & "([qaCloseDate]) AND " Case 2 strWhere = strWhere & "([qaCloseDate]) AND " Case 3 strWhere = strWhere End Select 1;value-A;2;value-B;3;All
Back
Top Bottom