Search results

  1. I

    VBA To Create Email

    I am using the syntax June7 posted. This is the code that I have, excluding the recordset being passed in which I verified is valid. Private Sub CreateEmail(strRS As String) Dim contact As String Dim emailBody As String Dim appOutlook As Outlook.Application Dim MailOutlook As Outlook.MailItem...
  2. I

    VBA To Create Email

    Ah-hah! That showed me I was missing the single quotes around the month! Onto my last issue.... This code works, creates drafts, but it just constantly loops through the recordset never stopping. For example, If I copy/paste the strRS into a query window it produces two results. However, for...
  3. I

    VBA To Create Email

    Hi - I like your approach much better! I finally have had a moment to test the code, but I am getting a debug error of on the Set rs line.... Run-time error '3061': Too few parameters. Expected 1 And this is the syntax I am using (with actual field names since I know realize that...
  4. I

    VBA To Create Email

    Hi all - I have a Customers table that has roughly 4,000 rows in it (and growing). I am attempting to automate some things that are currently manually done. Below is the process.. 1) Query Table1 For all customers whose ContactFUTimeFrame is current month 2) Create Two groups of the current...
  5. I

    Validation For Form

    Would this validation for each control be advisable? If Me.combo0.ListIndex = “-1” Then MsgBox “Please select from combo box” Me.combo0.SetFocus Exit Sub End If
  6. I

    Validation For Form

    That is short and sweet. I would like to notify the user of the specific control tho. Is there a way to provide that? And if multiple are blank just providing the first null/empty control is fine.
  7. I

    Validation For Form

    Okay, I misunderstood your question. None of the information is being saved to a table. However a few controls pull information from a table. On the button press a report is created that uses data from the form, which is why I want to ensure nothing is null/empty. So the report has all data...
  8. I

    Validation For Form

    No controls will be added. 3 of the controls are bound I was originally thinking of writing IF statements in the button press event and basically if validation fails show a message to the user as why it failed and stop code execution for the button press.
  9. I

    Validation For Form

    When does the before update event fire? Would that go for each control or for the button?
  10. I

    Validation For Form

    Hi - I have a form that has the below controls 2 combo boxes 1 listbox 2 text boxes 1 button What is the best way to ensure that when the button is pressed all controls have input/selection made?
  11. I

    Hi

    Small world! I’m in Athens.
  12. I

    Create Email Draft With All Attachments From Directory

    That put me one step closer!!! As you suggested .Attachments.Add(allFiles(i)) Would add the file name, but the code needed full path, so I changed it to .Attachments.Add(Me.combo0.Column(1) & "\" & Year(Date) & "\" & allFiles(i)) And it works exactly as desired. Thanks so much!
  13. I

    Create Email Draft With All Attachments From Directory

    Hah! That was one issue...I did a Debug.Print Me.combo0.Column(1) & "\" & Year(Date) & "\" And saw that I was printing a directory with an extra \ in it. NOW...I am getting the error of Run-time error '5': Invalid procedure call or argument on this line .Attachments.Add (i) oh and...
  14. I

    Create Email Draft With All Attachments From Directory

    Hi - I am attempting to create an email draft with all files from a directory as attachments. I attempted to utlize this handy script I found online, but I am getting an error of: Run-time error '9': Subscript out of range on this line For i = LBound(allFiles) To UBound(allFiles) And this...
  15. I

    Hi

    Hello all from good ole Georgia, USA!!! DAWG Country here :)
Back
Top Bottom