Search results

  1. C

    Error 3828 when exporting queries to Excel

    Thanks for the explanation. Same approach as Ken suggested in his post. Still don't understand why I was getting error 3828 or why it didn't like the form reference in the query criteria. Anyway, thank you very much again for your help :)
  2. C

    Error 3828 when exporting queries to Excel

    That did the trick! Thank you so much for your time to help me with the code :giggle:. What was the issue with the form reference in the query for it to require the code you created? I'm struggling to understand how that relates to the error 3828...
  3. C

    Error 3828 when exporting queries to Excel

    That's all correct
  4. C

    Error 3828 when exporting queries to Excel

    SalesOrder_Query SELECT Shipments.Order_Number, Shipments.Order_Shipment_Number, Order_Status.Order_Status, Customer_Orders.Customer_Order_Number, Customers.Customer_Ref, Shipments.Delivery_Date, Customer_Orders.Date_Order_Received, Customer_Orders.Order_Value, [Order_Value]/100*20 AS TaxValue...
  5. C

    Error 3828 when exporting queries to Excel

    I really appreciate your time to create this code but this time I'm back with the error 3828. Your approach from post #17 is the closest it's been to working for me.
  6. C

    Error 3828 when exporting queries to Excel

    With these changes I'm getting run-time error 3061 Too few parameters. Expected 1. I tried running the code with your attachment and can see it works but not with my setup currently. Still not sure whether I should be including SalesOrder_Query in the below because if not I get error 3828...
  7. C

    Error 3828 when exporting queries to Excel

    Do I also add SalesOrder_Query to this part of the code? If arrQueries(i) = "SalesInvoice_Query" Or arrQueries(i) = "PurchaseOrder_Query" Then If I don't I get the error 3828. I then added the query like this: If arrQueries(i) = "SalesOrder_Query" Or arrQueries(i) = "SalesInvoice_Query" Or...
  8. C

    Error 3828 when exporting queries to Excel

    Got it working now, I think I removed [Forms]![PowerBI_Export_Pop_Up_Form]![Text2] from the query without realizing. How do I amend the code so it includes the other queries in the same workbook? I also have "SalesInvoice_Query", "Customers_Query", "Products-Stock_Query", "ProductGroup_Query"...
  9. C

    Error 3828 when exporting queries to Excel

    Thanks for the attachment. I've just tested it on my database and the date entered in Text2 isn't having an impact on the exported records. All data is being exported from the query as if there is no date criteria. [Forms]![PowerBI_Export_Pop_Up_Form]![Text2] is the criteria for the...
  10. C

    Error 3828 when exporting queries to Excel

    Yes, formatted as general date. I've never had an issue with this approach before. Plus it's working with my query "PurchaseOrder_Query" but this doesn't involve the Customer_Orders table. This is why I'm saying the issue is a combination of the Customer_Orders table and referencing the form...
  11. C

    Error 3828 when exporting queries to Excel

    Thank you for the suggestion, however my lack of knowledge in the terminology you've used is holding me back in understanding what you mean. Are you able to simplify what you said or provide an example of what you mean?
  12. C

    Error 3828 when exporting queries to Excel

    The two queries causing the error are "SalesOrder_Query" and "SalesInvoice_Query" because these both have the Customer_Orders table, which seems to be the issue (I removed the tables from the queries one by one until I no longer had the error). However, if I enter the date directly into the...
  13. C

    Error 3828 when exporting queries to Excel

    Thanks for the suggestion but I'm still getting the error :(
  14. C

    Error 3828 when exporting queries to Excel

    Hello, I am trying to export multiple queries onto one workbook (one query per worksheet) using the below code: Dim strFilePath As String strFilePath = "Z:\Daily PowerBI Exports\PowerBI " & Format(Me.Text2, "ddmmyy") & ".xlsx" DoCmd.TransferSpreadsheet acExport...
  15. C

    VBA to Conditionally Format a Chart

    Yeah, that's understandable. Please do let me know if they come back to you about conditional formatting. For all of the excellent progress I've made with your help, technically my original post of seeking help with automatic colour formatting a chart still isn't resolved. But I sincerely...
  16. C

    VBA to Conditionally Format a Chart

    That's a shame, it's only an aesthetic choice for me because I'm not keen on the values being staggered as they currently are, and I'm not able to increase the width of the chart due to space constraints on the report. Hopefully the team can add that function in! I could go back to a classic...
  17. C

    VBA to Conditionally Format a Chart

    Thank you, that did the trick. I've checked the data and it appears to all be there. Whilst were on the subject of modern charts, I have a question. Is it possible for the Y axis values to go up in multiples of 20. I believe this is called the major unit in classic charts. So I'd like 0%, 20%...
  18. C

    VBA to Conditionally Format a Chart

    Thanks for the suggestion, please can you upload your edited version of the database so I can have a look? I am wondering if your results are similar to what I have done. The reason I say this is because the blue bar is still there. Going back to my original post, I am looking to have the blue...
  19. C

    VBA to Conditionally Format a Chart

    I think that issue is because I scaled down the sample database I uploaded. My version is working fine. I am noticing there is an issue with the reports below the chart when using the RequeryObjects sub. I can this is also apparent on your version you uploaded. When comparing the report records...
  20. C

    VBA to Conditionally Format a Chart

    Amazing! It does work. Thank you for your persistence :) Note sure what you mean by: What doesn't compile? Regarding your edit: I have fixed the expression in the underlying query for the coloured data fields so that issue isn't there when the blue bar exceeds 50%.
Back
Top Bottom