Search results

  1. graviz

    VBA Assistance Needed Please

    I have this code to output a query to an Excel spreadhseet and I'm trying to output the headings of the query as well. Can anyone tell when what I need to do in my code to make this happen? Public Function ExpExcel() 'Create connection to Database Dim cnn As ADODB.Connection Dim MyRecordset...
  2. graviz

    Powerpoint VBA Help Needed Please

    I need some assistance with automating some copying and pasteing from Excel to PowerPoint. I've search the forums for some help or examples and I am unable to find anything to help me with what I'm trying to accomplish. Here is what I am trying to do within Access using vba: Autorun some...
  3. graviz

    VBA SQL Question

    Bob- Thank you for always helping me out! That worked perfectly! For learning purposes what am I doing wrong on the recordset way of doing things: Public Function test2() Dim OL As Object, MailSendItem As Object Dim CompM As String Dim db As DAO.Database Dim compp As DAO.Recordset Set OL =...
  4. graviz

    VBA SQL Question

    When I change it to that I receive Run-time error 3075 Syntax error in query expression 'Comp%'. Public Function test2() Dim OL As Object, MailSendItem As Object Dim CompM As String Set OL = CreateObject("Outlook.Application") Set MailSendItem = OL.CreateItem(olMailItem) todaysdate = Date...
  5. graviz

    VBA SQL Question

    I know I'm missing something pretty basic but I cannot get this to work: Public Function test2() Dim OL As Object, MailSendItem As Object Dim CompM As String Set OL = CreateObject("Outlook.Application") Set MailSendItem = OL.CreateItem(olMailItem) CompM = "Select...
  6. graviz

    Loop or Array Help Needed Please

    Bob- I attached your database and made a couple of changes. How would I change the code if I only want the query the names that are in the "New Customer" table. I don't want to change the orderes table (because that's similar to my sitution as there are more offices(customers in thie case)...
  7. graviz

    Loop or Array Help Needed Please

    Bob- 1. Very true and I think I may be doing some of what you said and some I believe I do a make table query and output the table. I probably just need to clean it up and do one or the other. 2. I'm trying to stay away from forms as I would like to set this up as an auto job and it would...
  8. graviz

    Loop or Array Help Needed Please

    I think I'm getting closer. I looked at your code and I want to make sure I understand it. I went ahead and put comments under each line. Could you let me know if I'm off or answer the couple questions I had below? Function runthisfunction() DoCmd.SetWarnings False 'Turn off warnings Dim...
  9. graviz

    Loop or Array Help Needed Please

    Not so much. An example would be great. Thanks for your help!
  10. graviz

    Loop or Array Help Needed Please

    May need to open another post as I do not know anything about sql. : ) The queries basically pull different metrics for the offices from different tables. (most of them are make table queries) The end result I am going for is to output them to excel spreadsheets which I do know how to do. The...
  11. graviz

    Loop or Array Help Needed Please

    I have about 10 queries I will need to run daily for 20 different offices. As of right now I go into each query and change the "office" criteria for each query 20 times. I've heard of loops and arrays but I don't know anything about them. I've tried searching for infomation on them but I...
  12. graviz

    Random Rdn() Funtion Help Please

    Thanks for the help everyone. It works perfectly now. I apologize that I was completely missing it.
  13. graviz

    Random Rdn() Funtion Help Please

    Isn't that what I did in my original post? If not please explain what it is.
  14. graviz

    Random Rdn() Funtion Help Please

    You mean what I did in my original post?
  15. graviz

    Random Rdn() Funtion Help Please

    What does the Randomize statement mean? I tried the expression you pasted as you can see in my first post.
  16. graviz

    Random Rdn() Funtion Help Please

    I have a query of a bunch of records and I'm trying to assign a random number to each one. The issue is when the data pulls, it's giving the same number to each record. My expression is below: Random: Int((999-100+1)*Rnd()+100) I've also tried just Rnd() and it also doesn't work. Any...
  17. graviz

    HTML E-mail using vba

    I just figured it out. It's supposed to have double quotes instead of single quotes.
  18. graviz

    HTML E-mail using vba

    I'm having trouble with sending a link in an e-mail using vba. My code is below: .HTMLBody = .HTMLBody & "<a href=“file:///\\Mer2-corpfs1\dnsc\Resource Management\Cancel Audits\OE”>OE</a>" In the e-mail it looks like a link but when I click on it it pulls up a file explorer and states in...
  19. graviz

    Export Access Pivot Table Results to Excel

    Is there any way to export a pivot table from access to Excel? I have a couple Excel templates that I paste the pivot table results from access into and it populates the data in a format I need for some slides. I've tried a crosstab query but it's not a option. Is there any way to use vba to...
  20. graviz

    Formatting E-mail Using Code

    Thanks let me know.
Back
Top Bottom