Search results

  1. Sevn

    Export Query To Excel With Multiple Criteria

    Hello All, I have some working code that I would like to clean up. I'm sure there is a better way to write this, but I'm not very experienced in VBA yet. Please forward any suggestions that you may have. Sample Code: Option Compare Database Private Sub cmdExport_Click() 'Backup 20081003...
  2. Sevn

    Export Query To Excel With Multiple Criteria

    Hello again, Thanks for the simplified code bits, but both are returning the same error. Compile Error: Statements and labels between Select Case and first Case. In addition; there is actually a second combo box that designates company, and I will need to work it into the code. The combo box...
  3. Sevn

    Export Query To Excel With Multiple Criteria

    Hello, I new there was an easier way. You guys just wanted me to figure it out the hard way first. LOL! I will try it out, and see what happens. Thanks again for all your help...
  4. Sevn

    Export Query To Excel With Multiple Criteria

    Hello All, I wanted to tell all that help on this issue, THANK YOU VERY MUCH!:D After many hours of staring at the code:eek:, I finally figured out what I was doing wrong. Everything from hyphens(-) in my query names, to trying to trying to create SQL strings w/o variables being set...Duh...
  5. Sevn

    Export Query To Excel With Multiple Criteria

    Hello, I have attempted to move the strSQL query in the following way, and got the same error, but now it says Expected 2. Option Compare Database Private Sub cmdExport_Click() Dim xlapp As Excel.Application Dim wb As Excel.workbook Dim ws As Excel.worksheet Dim rs As Recordset Dim strSQL As...
  6. Sevn

    Export Query To Excel With Multiple Criteria

    Hello All, I am very sorry for being difficult, but I have no idea how to see the values of my variables the way you are describing to me. I do see that the strSQL variable is trying to be set before the strVolCat value is set, could this be the problem? Maybe my code should be as follows...
  7. Sevn

    Export Query To Excel With Multiple Criteria

    I don't understand what you mean by "break point". Can you explain further?
  8. Sevn

    Export Query To Excel With Multiple Criteria

    Hello, Thank you for you response, but I am still getting the same error. Here is what I have now, post corrections: Option Compare Database Private Sub cmdExport_Click() Dim xlapp As Excel.Application Dim wb As Excel.workbook Dim ws As Excel.worksheet Dim rs As Recordset Dim strSQL As...
  9. Sevn

    Export Query To Excel With Multiple Criteria

    Hello, Thanks for your input, but I'm still getting the same result/error.:confused: I'm still a newby with VBA, so I can use all the help I can get.
  10. Sevn

    Export Query To Excel With Multiple Criteria

    Hello again, Well I figured out why the button wasn't firing...I had my case statement set to the wrong combo box. LOL! Although; I get the following error when ran: Run-time error '3061': Too few parameters. Expected 1. When I Debug, the editor highlights the red code below. Option Compare...
  11. Sevn

    Export Query To Excel With Multiple Criteria

    Hello again, I have mode all of the modifications, but it still doesn't seem to be firing. I have pasted the code below. Can you take a look, and see if everything appears to be in order. Private Sub cmdExport_Click() *I have tried Private & Public, does it matter? Dim xlapp As...
  12. Sevn

    Export Query To Excel With Multiple Criteria

    Hello again, I have taken a look at your suggestions, but need some clarification about something. What goes in place of the red text. I am sure that "table" is to be ("ExportQry-CPMByCompany") with () & "" included, but am unsure what to place in "stuff". strSQL = "SELECT stuff FROM table...
  13. Sevn

    Export Query To Excel With Multiple Criteria

    Hello, I have written out the following code, and it doesn't seem to be firing when I click the cmdButton. Please let me know if you see something wrong that I must be missing. ************************* Option Compare Database Public Sub cmdExport_Click() Dim xlapp As excel.Application Dim...
  14. Sevn

    Export Query To Excel With Multiple Criteria

    Hello, and thanks again for your response. Please confirm that I understand your logic correctly. I believe you have given me the basic code needed to accomplish the export to Excel. So; I should just need a CASE statement to tell Access what worksheet to export to run. Example: dim xlapp...
  15. Sevn

    Export Query To Excel With Multiple Criteria

    Hello, Thanks for your response, but I am a very novice user when it comes to VBA. Can you provide an example for further explanation. In most cases; I can understand what the code is saying, and can modify as I see fit. Thanks, Sevn:D
  16. Sevn

    Export Query To Excel With Multiple Criteria

    Hello All, I am working on an export module, that I can't seem to figure out. My project:' I have a form that has 2 combo boxes, and one "Go" button. Company, VolCat Within the VolCat combo box, I have eight unique items, and an "ALL" item. The ALL items references a "*", so I may grab all...
  17. Sevn

    Multiselect listbox results as query criteria using a hidden textbox

    Hello gemma-the-husky, I appreciate your help, but I'm not very fluent with VBA quiet yet. I can read through code, and understand what is going on (and alter, if needed). Although; I am NOT a programmer by any stretch of the imagination. Again; I thank you for trying to help, and hopefully...
  18. Sevn

    Multiselect listbox results as query criteria using a hidden textbox

    Hello, I have a similar situation, and would like to know if someone can forward me the a sample DB like the one mentioned (if available). If not; can someone guide me in the right direction. I have a form that has many combo boxes & list boxes, and I need to have the ability to select...
  19. Sevn

    Concatenation Function Issue

    OUTSTANDING! IT WORKS. Thank you so very much. This is much better than what I have been doing. I had been writing one really long concatenation string, and it left commas after each blank field (B02,,,,,,,B16,,,etc.). This is much nicer. I also want to thank you for explaining the query to...
  20. Sevn

    Concatenation Function Issue

    Wayne, I am really sorry, but I must be still doing something wrong. I have pasted your SQL query in the appropriate place, and get a missing operator error. I have attached a screenshot to illustrate. I'm not completely sure what you you mean by the [ParentTieID] needing to be the parent...
Back
Top Bottom