Search results

  1. A

    Solved Group salesproduct table by year and itemID?

    Nice! That is exactly what I was looking for. Thank you @plog and @arnelgp for your answers.
  2. A

    Solved Group salesproduct table by year and itemID?

    Hello, I am trying to figure out how to make a query that will have total sales (by quantity) of every product by year? Table SalesProduct has SaleID, itemID, Quantity fields (and a few others not relevant right now). Table Sales has SaleDate, SaleID (and a few others not relevant right now)...
  3. A

    Solved Run-time error 2501

    Yes, same languages, same defaults (english). I will remove 2nd language now and see if it changes anything. Tried that, nothing changes. It's something with formatting that I'm missing. When I try to save it without last part of the name (date and time), it can save it. Found it. It was a...
  4. A

    Solved Run-time error 2501

    I did that few days ago (honestly, didn't know that the order matters). Everything looks completely the same. I have compared all 3 computers. It has to be something related to formatting or regional settings, that's for sure. Here is an example of generated output name: 03275 - Marko Marković...
  5. A

    Solved Run-time error 2501

    Yes, the computer is freshly installed. It's a nice thought, but everything has been done and configured properly. I have checked for updates, etc. It had to be something with the file name or Unicode chars for reportName. I have tested it again with fixed path (instead of filePath) and fixed...
  6. A

    Solved Run-time error 2501

    I have tested each line separately, paths are correct. I have a bug at the back of my head that I had to do something on machine when it was first brought to work, but cannot remember what. That drives me out of my mind right now. Might be related to Unicode characters (file names contain...
  7. A

    Solved Run-time error 2501

    Thank you for fast replies. Directories are empty. Nothing inside, reportK subfolder is also there (with appropriate permissions). Same thing happens if I add pause between OutputTo and Close lines.
  8. A

    Solved Run-time error 2501

    I'm having trouble with exporting report to a PDF file. This error happens only on newly installed PC and fresh installation of Office 2016. On two other machines (same version of Office, same database, different paths), everything works as expected. I have tried checking regional and language...
  9. A

    Reducing PDF output size?

    Yes, it was created a long time ago, and as I recall, there are plenty of things behind that forced me to use DoCmd.OpenReport . Any ideas about reducing PDF file size?
  10. A

    Reducing PDF output size?

    It seems that, when generating PDF with DoCmd.Output to command, PDF file gets unusually big. This is what I am using now: DoCmd.OpenReport "Report", acPreview, , "[ID]= forms![frmGenerate]![ID]", acHidden DoCmd.OutputTo acOutputReport, "report", acFormatPDF, filePath, True Current PDF file is...
  11. A

    Solved Execute a batch file with parameters from query?

    Nice! That did the trick. Now everything works as it should. Still some things to be polished, but in general everything is working as expected.
  12. A

    Solved Execute a batch file with parameters from query?

    Well, I finally found some time today. For a while, it looked like I might get away with the theDBguy suggestion: Private Sub btnBatch_Click() Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("qryAisleInfo") Do While Not rs.EOF Call Shell("D:\_DB\_gateway\send.bat" & " " &...
  13. A

    Solved Execute a batch file with parameters from query?

    I am on it tomorrow evening. We had new stock that was imported yesterday, so 2 days are we all over it. Generally, what I have to do with all this is to send proper information to workers at the warehouse (as mentioned). Main reason is that we are working with 50% capacity since february...
  14. A

    Solved Execute a batch file with parameters from query?

    Thank you for your answers. I don't have much experience with it theDBguy, I mostly rely on examples that I can found and documentation. Batch file with 2 parameters (myfile.bat number ID), sends SMS message to our gateway (only way I could figure out how to communicate with it directly is via...
  15. A

    Solved Execute a batch file with parameters from query?

    So, I am looking for a way to execute a batch file with 2 arguments. Arguments are values from a query. Query result has 10-15 rows, so it means that it should iterate through every row, pick up values from those 2 columns, pass them to batch file and execute. In order to start a batch file, I...
  16. A

    Export query result to excel with column width and some more changes...VBA?

    I did manage to get it done with this: LR = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row i = 1 Do While i <= LR If Cells(i, 13).Value = "FALSE" Then ws.Rows(i).EntireRow.Interior.Color = RGB(255, 0, 0) End If i = i + 1 Loop ws.Columns(13).Delete MsgBox "S&R finished", vbInformation +...
  17. A

    Export query result to excel with column width and some more changes...VBA?

    Well, my problem is that I have to visually mark it, otherwise the responsible person might miss it in the warehouse (happens very often). I am very thankful for your help, I am already on "highlight" thing, looking how to do it, and I will get back here soon with the progress report.
  18. A

    Export query result to excel with column width and some more changes...VBA?

    For the coloring, I thought about exporting the checkbox column. That would appear as True/False in Excel, then highlight all false and at the end delete checkbox column? After that, I could use an update to change it in tblItems.
  19. A

    Export query result to excel with column width and some more changes...VBA?

    Well, I have managed to get it with the search and replace (good call Isaac for idea about macro recording). Took me an hour to figure out that I have to include excel object library, but at the end there is some satisfaction when everything is working OK. Now to the most important part. I...
  20. A

    Export query result to excel with column width and some more changes...VBA?

    Isaac, thanks for suggestion. It works exactly as I wanted it to. Now, with wb declared, seems that there is more control over the entire process. I also don't have "save as" dialog when exiting Excel. Regarding the question about manual way, it was working perfectly (we have done it a million...
Top Bottom