Search results

  1. M

    Simple sum field on report not working.

    ridders, yes, I did look at your examples but still I could not make it work until I moved the running sum fields to the report footer after noticing that this is how you had it. Thank you for your help! I will keep your db example for future reference. mafhobb
  2. M

    Simple sum field on report not working.

    I think that I got it. It all seems to work if I place it in the report footer, but it does not work if I place it in the page footer. mafhobb
  3. M

    Simple sum field on report not working.

    Still struggling with this seemingly simple thing. I have modified my query so it does some of the calculations itself and the fields get filled out correctly, but I still need a running sum and I only get #Error. The source for the running sum field is =Sum([HistoryHours]). HistoryHours is a...
  4. M

    Simple sum field on report not working.

    Ridders, both of the fields contain numbers and in the tables that they belong to, they are defined as numbers arnelgp, I have tried to change to fieldname and I received the same error. I have also tried to multiply this field with other field in the same report to get a calculated field and...
  5. M

    Simple sum field on report not working.

    Hello, I have created an invoice using a report that draws its data from a query and places it in text boxes. The data displays fine. On the report's page footer (and report footer, I have tried both) I have added another text box where I intend to sum the running total of one of the text...
  6. M

    Bound forms. Moving to next form before saving record.

    arnelgp, That did it! thanks mafhob
  7. M

    Bound forms. Moving to next form before saving record.

    So why is it that when the second form is opened right after the fields in the subform records are entered the second form comes up empty? Instead, if I tab out of the new subform record, click on it to select it again and then open the second form, it is all OK. This is the code to open the...
  8. M

    Bound forms. Moving to next form before saving record.

    So I have a bound form with a bound continuous subform in it. The form contains customer data and the continuous subform contains properties that this customer owns. On the same continuous subform there is a button that takes you to the property's details form, also bound. On the subform, a...
  9. M

    Update query using two tables

    I think that this might do it CurrentDb.Execute _ "UPDATE Calls INNER JOIN ReturnInfo ON Calls.CallID = ReturnInfo.CallID " & _ "SET ReturnInfo.Warranty = 1 " & _ "WHERE (((Calls.IssueTypeID)=9))", dbFailOnError mafhobb
  10. M

    Update query using two tables

    I have a table called Calls which has several fields, among them one called CallID and another one called IssueType. Then, there is another table called ReturnInfo with several fields, one also called CallID and another one called Warranty. I need to come up with an Update query that finds all...
  11. M

    Struggling

    Hi I am struggling with this query. The message box simply returns the sql text itself, not the count result. All I need is the count of the field "warranty" when the SKU equals a specific value and "warranty" = 1. SQL = "SELECT Count(ReturnInfo.Warranty) AS CountOfWarranty FROM Calls...
  12. M

    Dcount or other?

    Got it! So Dcount does work well for this...Cool Thank you plog mafhobb
  13. M

    Dcount or other?

    Plog, This is very close to what I need, but not quite. I am looking for a single number output for each SKU and IssueTypeID that I input. For example, based on the previous post, if I enter SKU "AAAA" and IssueTypeID "1" then I need a single number that matches those two. How do I do that? I...
  14. M

    Dcount or other?

    Hi. I use the following code to count the number of records with a specific SKU number: A = DCount("SKU", "Calls", "SKU= '" & SKUList!SKU & "'") This works well, however now I need to narrow down my results. The same table "Calls" has another field "IssueTypeID" which has values from...
  15. M

    How to export listbox values to Excel

    Sneuberg, I ended up doing my own code, but I will look at yours right away to see how it could be done differently. Thanks for all your help! mafhobb
  16. M

    How to export listbox values to Excel

    This is what ended up working for me. It is not cleaned up yet. ' Defining variable Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet Dim SQL As String Dim rs1 As DAO.Recordset Dim rs2 As DAO.Recordset Dim rs3 As DAO.Recordset...
  17. M

    How to export listbox values to Excel

    Yes, I commented qdf2 out and it still works so my guess is that once a qdef is set referencing a field in a form, if other queries use the same field (which is exactly what happens in my other query), then it already knows what the reference is and it does not need to be defined again. Could...
  18. M

    How to export listbox values to Excel

    Set rs1 = qdf1.OpenRecordset() This does work, but please, can you explain why it is "...qdf1.Openrecor..." that I am using and not "...qdf2.Open..."? I mean, what does the definition for qdf2 do in this code? I guess I probably just coded it wrong when I defined qdf2? Does it even need to be...
  19. M

    How to export listbox values to Excel

    Sneuberg, You are correct, two of my queries have a form reference. I have updated the code using the example in the link that you posted (Thank you!) However I still get he same error... here is the updated code: Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim...
  20. M

    How to export listbox values to Excel

    As I try to work out this code, I am trying to assign my query results to a recordset but I am running into an issue. This works fine: SQL = "SELECT [Error Codes].ID, [Error Codes].ErrorCode, [Error Codes].Active FROM [Error Codes]" 'Execute query and populate recordset Set rs1 =...
Back
Top Bottom