Search results

  1. 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...
  2. 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...
  3. 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"...
  4. 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...
  5. 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...
  6. 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?
  7. 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...
  8. C

    Error 3828 when exporting queries to Excel

    Thanks for the suggestion but I'm still getting the error :(
  9. 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...
  10. 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...
  11. 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...
  12. 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%...
  13. 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...
  14. 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...
  15. 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%.
  16. C

    VBA to Conditionally Format a Chart

    Hi Colin, Thank you very much for the time you have spent looking at my project. Also, I really appreciate your feedback. I am self taught with VBA so a lot of bad habits and/or over complications have crept into my coding over the years. It is very helpful to have direct feedback on what I have...
  17. C

    VBA to Conditionally Format a Chart

    As I said, no rush. I do appreciate your time helping me with this :)
  18. C

    VBA to Conditionally Format a Chart

    My main objective was to have the blue progress bar coloured like the traffic light system, as you say. However, since using a modern chart, the requery part of the calendar report code is no longer working so the chart is not updating when the calendar controls are used. The chart updates with...
  19. C

    VBA to Conditionally Format a Chart

    That's correct, Monday_Machine_Type_Usage_Total_StackedChartReport is the chart report and the chart is named Chart4. No problem, there's no rush to resolve this. Others are welcome to take a look. I am grateful for any help I can get.
  20. C

    VBA to Conditionally Format a Chart

    I didn't because I wasn't 100% sure on what you meant and you mentioned manually changing the color of the bars and this is what I want to avoid. I was also distracted by learning about modern charts so ended up going down that route.
Back
Top Bottom