Recent content by MRdNk

  1. M

    Export Query To Excel With Multiple Criteria

    Oh its Access 2007, can't help unless you make a copy of that file, and convert it back to 2003. This procedure should work in both. Otherwise someone else might be able to help you. Did you try my latest suggestion? And what error is it giving, if it doesn't work?
  2. M

    Export Query To Excel With Multiple Criteria

    Please let me know if this works?
  3. M

    Export Query To Excel With Multiple Criteria

    If you use mine, except use this for the case: Move this: Select Case [Forms]![Frm-SelectCompanyVolCat]![Combo94] to here: Select Case [Forms]![Frm-SelectCompanyVolCat]![Combo94] Case "1A" strVolCat = "1A" Case "1B" strVolCat = "1B" Case "1C"...
  4. M

    Export Query To Excel With Multiple Criteria

    Can you post a copy of your DB without any sensitive data?
  5. M

    Export Query To Excel With Multiple Criteria

    Ps. I add my comments and name, to show you where I changed it, please feel free to remove them.
  6. M

    Export Query To Excel With Multiple Criteria

    Hopefully this'll work, let me know if you have any issues. Are you select all fields & data from your table? If so replace the strSQL with: strSQL = "SELECT * FROM ExportTblCPMByCompany" A lot easier to write & read. Try it: Private Sub cmdExport_Click() Dim xlapp As Excel.Application...
  7. M

    Export Query To Excel With Multiple Criteria

    Glad to help, it's good experience to read about others problems and try to solve them, on a bit of a mission to learn Access, then hopefully freelance next year. You should look at reducing your code, you're repeating a lot of code, that doesn't need to be duplicated; which slows it down.
  8. M

    Export Query To Excel With Multiple Criteria

    I did a quick screen shot to demonstrate, hope this helps.
  9. M

    Export Query To Excel With Multiple Criteria

    Yeah - that would be an issue. Does it work now? Did you figure out how to add a breakpoint? If you have, once you have the breakpoint on you can hover-over a variable ie. strSQL and it'll tell you the value of that variable.
  10. M

    Export Query To Excel With Multiple Criteria

    If you add a breakpoint on "Select Case [Forms]![Frm-SelectCompanyVolCat]![Combo94]" What do the values for strVolCat & strSQL show up as & are they correct?
  11. M

    MS Access vba Class For Label = 0 to 2 return RecordSet 0 to 2

    I'm trying to really get to grips with classes, and I want to be able to run everything via vba, rather then via Access's standard options. They're labels, so that they can be on the main page, and can have a click event. It may seem long winded but it'll really save time and effort later on.
  12. M

    Display a warning if form field unchanged

    Would be better if you posted your code so far, then we can identify ways of changing it. There are usually different methods for doing this, but its best to see the code, to work out the best way to go, but it is possible.
  13. M

    Export Query To Excel With Multiple Criteria

    Good point, I would always write the Where criteria inside parenthesis so: "... WHERE ([VolCat] = " & sVolCat & ");" Although I guess I stand corrected. Useful information for the future.
  14. M

    MS Access vba Class For Label = 0 to 2 return RecordSet 0 to 2

    Hi All, Here is why I'm trying to do, but I just can't work it out. I have a main page, and on the left I hand side, I have a list of labels, that represent stores, the name of the label = StoreName, and the backcolor = integer defined by StoreStatus String I'm basing it, while getting the...
  15. M

    Export Query To Excel With Multiple Criteria

    I would actually end it & ");" "SELECT DefineCPMVolCatByCustomer.ParentTieID, DefineCPMVolCatByCustomer.Customer, DefineCPMVolCatByCustomer.Volume, DefineCPMVolCatByCustomer.GrossPerTon, DefineCPMVolCatByCustomer.GrossSales, DefineCPMVolCatByCustomer.GTNPerTon...
Back
Top Bottom