Search results

  1. B

    Switching From Access 2003 to Access 2007 - Trouble calling a query in VBA

    The actual code that calls the query is very lengthy so I am only posting the offending line. Bassically, any code that calls a select query should do the same thing (I believe, based on my testing). In my case, the select query "MyEmailAddresses" contains a value called LCA Group. In the...
  2. B

    Switching From Access 2003 to Access 2007 - Trouble calling a query in VBA

    Greetings Revered Access Guru's! Okay, so we recently "upgraded" from Access 2003 to Access 2007 and now I'm having a problem with two queries called be VBA to send e-mails. The queries both have user prompts in them so specific values can be isolated. In Access 2003, they both got called by...
  3. B

    Access to Excel Compatability

    Okay Team! Turns out this was way esaier than I thought! All I had to do was replace all occurances of .Application.Selection.Interior.Color = 16628595 With .Application.Selection.Interior.Color = RGB(0, 204, 255) I think the color is slightly different than the original, but not...
  4. B

    Access to Excel Compatability

    Well, I had to set this asside for a few days but after testing the steps in formatting, it turns out that is is the background color of the header rows that is causing the error. With that said, does anyone know the correct color coding for Excel 2003? And by the way Bob... I'll look into...
  5. B

    Access to Excel Compatability

    Well, I really thought I had done that... I know it's kind of lengthy but I am posting the formatting code below. I guess I don't know what might be a 2007 format feature based on what I am doing, but I admit I am not that good at VBA, so.... Option Compare Database Public Function...
  6. B

    Access to Excel Compatability

    Ok, I am using Office 2007 to build an Access application that uses VBA to first create and then format an Excel file. Everything works fairly well despite my very clunky coding except when I get to the end of the formatting function. I am getting an error from "Compatibility Checker" that...
  7. B

    Formatting Excel with VBA - 2 files open

    UGH!!!! I'm sooooo stupid! All I had to do was replace .Application.Sheets(" & newCMD & ").Select with .Application.Sheets(newCMD).Select and it works great! Sorry to be such a bother...
  8. B

    Formatting Excel with VBA - 2 files open

    Ok... I've got ghudson's method working pretty well for my purpose except that I'm having a little trouble with a loop. I'm sure this is a very elementary mistake but I can't figure out how to make it work. What I need to do is use a DO UNTIL loop to go through a list of codes that eventually...
  9. B

    Formatting Excel with VBA - 2 files open

    Excellent! I think that got it! Thanks!
  10. B

    Formatting Excel with VBA - 2 files open

    Ok, I think I understand what you mean. Now, how would you format a second, different worksheet? I can do the formatting just fine, I just can't get it to move to the next sheet....
  11. B

    Formatting Excel with VBA - 2 files open

    Bob, I'm sorry but I must just be dense... I've tried and tried and I can't get the code to switch to a new worksheet. I am setting the value of xlWBk the same way both initally and where I want to switch. It doesn't change to the new worksheet but it does select all the columns in the...
  12. B

    Write access recordset to Excel file

    No, the loop lets it gather all the records. I am inserting into a temp table then spooling the content out to Excel. I think you are trying to send directly to Excel via VBA, right? You may want to consider a temp table, simular to what I do. but you should also check out Bob's examples...
  13. B

    Formatting Excel with VBA - 2 files open

    Actually, I tried some of those already and the TransferSpreadsheet command seems to work best for me (well, given my clunky coding, it works...). Thus far, I am able to do the formatting in a seperate module and I'm not that bothered by it. What I can't seem to figure out right now is how to...
  14. B

    Formatting Excel with VBA - 2 files open

    Well, Bob; you are correct as usual! Taking out that line stops it from opening the extra copy. That means I must have seperate functions to first populate my Excel and then format my results. That will be tricky since I use a loop to build several tabs based on table data, but I think I can...
  15. B

    Write access recordset to Excel file

    It's actually not that hard to use this method to construct complex results. I use loops and build-on-the-fly SQL to populate Excel from Access. The code below works for me. It is based on the advice and assistance of the very fine community of programmers here on this forum! Maybe you can...
  16. B

    Formatting Excel with VBA - 2 files open

    Hi Bob! Somehow, I just knew this would get your attention! You're always helping me out! Anyway, I tested in my application using this code and the same thing happens. Whatever is wrong is in this block. The other code I pulled out is just me sending out other query results to the Excel...
  17. B

    Formatting Excel with VBA - 2 files open

    Greetings! I am using a VBA module to first export then format a query result from Access to Excel. Before I started trying to format the results, everything worked perfectly. I am able to send my results to Excel without any problems. Now, I'm trying to format my results a little but for...
  18. B

    Brain fart - extracting file name from string

    He meant in the title of the post...
  19. B

    Formatting Excell from VBA

    Okay, I'm sure this has been asked and answered may times but I just don't seem to know how to ask the question so my search doesn't tell me what I need to know. What I am doing is sending a bunch of data to Excel from Access using VBA. Now, the actual data transfer works perfectly (even if...
  20. B

    Tab formating in a String Value

    Okay! That did it! Works for both short and long values! Thanks Ken!
Back
Top Bottom