Search results

  1. A

    Send email from access vba using outlook

    MyMail.BCC does work, but only for sending an email to one person, this defeating the purpose of the BCC. Is there a way to send to multiple people and BCC them?
  2. A

    Send email from access vba using outlook

    I have code that works well below getting email addresses from a query and sending it. However, I would like to make all the recipients Bcc. If anyone could suggest some tweaks to my code below, I would appreciate it: Private Sub cmd_email_del_Click() On Error GoTo error Dim db As...
  3. A

    Access VBA to excel

    Thanks, I will try that. I guess more to the point, I would like to know how to put a range into a string, it is not pasting the text into excel in my y case statement: Do While y <= 3 Select Case y Case 1 myyear = "2006" mylocation = "objws.Range('A1').Value" Case 2 myyear = "2007"...
  4. A

    Access VBA to excel

    I have one template consisting of one tab in excel. I have a loop to cycle through criteria in a query and paste it out to excel. I am having a problem with my y select statement(in bold below). It is not actually pasting the text in the denoted cell. Any help is appreciated. Other issues...
  5. A

    Access VBA using dates as criteria in a query

    I am storing dates as strings as putting them in a case statement. I want to cycle through them all, but am getting an error in my SQL string statement. I think the way I am storing the dates is incorrect. Any thought?? Private Sub cmd_runholds_Click() Dim queryName As String Dim ObjExcel...
  6. A

    DMAX Data type mismatch

    Thanks! I made a stupid mistake, I needed to replace rs + 1 with year. It now works. I also changed my year variable to a unreserved word.
  7. A

    DMAX Data type mismatch

    What is wrong with my code: Private Sub Command20_Click() Dim rs As DAO.Recordset Dim year As Single year = DMax("[Request Year]", "Request_Year") MsgBox year Set rs = CurrentDb.OpenRecordset(year) With rs .AddNew ![Request Year] = rs + 1 .Update .Close End With Set rs = Nothing I get a...
  8. A

    Clearing a form

    Is there any way to set all of the text boxes/combo boxes, etc to null values all at once in VB as opposed to clearing each one individually.
  9. A

    from a db, send one email to multiple people

    I have code in my access db that selects certain email addresses from a table, opens outlook and sends them an email. I can't figure out how to add multiple email adresses to one email. any help is appreciated: ' Now, we open Outlook for our own device.. Set MyOutlook = New...
  10. A

    Save two tabs as 1 one workbook

    I have code which is pasted below which take 8 queries for 4 programs(summary and details tab for each), and saves them all in one excel workbook. I need to also take the summary and details tab for each individual program and save as its own workbook(four total workbooks). Anyone have ideas...
  11. A

    My SQL String is not working in my vba code!!!

    It is working! Thanks!
  12. A

    My SQL String is not working in my vba code!!!

    I am still fairly new to coding. Can I simply take the second WHERE Out? Also, could you explain the ' in Driver's and why it is bad? Thanks so much for your help
  13. A

    My SQL String is not working in my vba code!!!

    Ok, I think I did it correctly and pasted it below: Select [Fiscal Year/Program], [Amount Appropriated], [SumOfSumOfAllocation], [SumOfCurrent Obligated Amount], [SumOfDraw Downs], [SumOfAward Balance], [SumOfCurrent Holds], [SumOfAvailable Funds], [SumOfNumber of Awards], [SumOfSumOfNumber of...
  14. A

    My SQL String is not working in my vba code!!!

    I spaced out my SQL code, and it stills seems to not like it. If anyone has any other ideas, I would gladly try them. Thanks.
  15. A

    My SQL String is not working in my vba code!!!

    I have my crit below built into a case statement for 14 different excel worksheets. I pasted three below for brevity For j = 1 To 14 Select Case j Case 1 strProgram = "DLSGP Summary" strProgram_detail = "DLSGP Details" mycrit = "'*Real*' Or '*Driver's*'"...
  16. A

    My SQL String is not working in my vba code!!!

    This is a small part of my code where I am pulling all the columns below from a query I created [REG - Master - Summary - Final]. I attempt to run and get a syntax error(missing operator). I think my error is near the end of the string in my WHERE statement, or my LIKE statement. Any...
  17. A

    Update query to insert new password into table

    I created a form that helps the user create a new password. I want to create an update query that will take the new password and overwrite it for the appropriate user in the table. Attached is what I have: Private Sub cmd_changepass_Click() If IsNull(Me.txt_username) Then MsgBox " Enter your...
  18. A

    assigning variable to worksheets

    Can anyone help me with my cases? I keep getting subscript out of range errors when I try to set my excel worksheets. Port is the name of the tab in excel and stPort is the name in my query. ANy help is appreciated: Function SendToPort() Dim rsOut As DAO.Recordset Dim objExcel As...
  19. A

    Remove hyphens from a string in a table

    I am trying to remove all hyphens from 1 column in a access table. I have created an update query, but when I try to insert a replace function, I get compile errors in my query expression. I am trying to strip out all hyphens from the column Award number from the Port Area table. Help...
  20. A

    How do I streamline this vba code???

    The vba code below is what I have come up with to take fields I want from a query I created in Access and paste the results into 10 separate Excel files(region 1-10). I have essentially just repasted this over four more times and changed DLSGP to my other 4 programs names that I am also adding...
Back
Top Bottom