Recent content by Larkin

  1. L

    Multiple attachments stored in DB attached to Email

    Interesting. I did not try m. Yeah effectively what I need to do is take the attachment(s) from that query and auto add them to the email. So there is also a report generated that needs to be attached as well, that part I have had working for awhile. Another option would be to add the...
  2. L

    Multiple attachments stored in DB attached to Email

    So It does, as the attachment is stored in the DB, and that field holds the like 5 or 6 fields an attachment field does including Name and path, but assuming maybe access doesnt parse that well, I started to attempt to export the files so that then I could in essence simplify the attach code to...
  3. L

    Multiple attachments stored in DB attached to Email

    In addition, I ran a watch on qdf, and I can definitely see the field there, all the sudden it started giving me an object doesnt support this action error, so I assumed I needed to save the attachments first, but effectively in that sub I am back to it declaring that the object doesnt exist...
  4. L

    Multiple attachments stored in DB attached to Email

    So that helped make some progress. Now I am getting an item not in collection on the O.Attachments.Add line, however using a For Each I had the code print the name of the fields, and the field I am trying to pull is definitely there, I also checked and ensured that there is a document in that...
  5. L

    Multiple attachments stored in DB attached to Email

    So I attempted these changes, and I am getting a data type conversion error. Which is strange as the TempVar is the same, and is a int just as the field it matches against. I am not sure what is causing this. Option Compare Database Option Explicit Public Sub SendBio(MessageBody As String...
  6. L

    Multiple attachments stored in DB attached to Email

    Oh wait, I see what you are getting at now, because the query is parametered I need to input a parameter for that. Wow. I don't know why that didn't hit me. Would that be done by adding a where statement to the select line, or do I need to call the parameter? If I need to call the parameter how...
  7. L

    Multiple attachments stored in DB attached to Email

    So it does have parameters on the query, which is a criteria in the [Assignment Details].[Assignment ID] field it only pulls the records where that field = the DataPass TempVar. Originally I tried the querydef way of creating the recordset and the arguments for all that, I don't remember the...
  8. L

    Multiple attachments stored in DB attached to Email

    This is the code that calls the above one: Private Sub Command25_Click() Dim MessageBody As String Dim RecipientEmail As String Dim Subject As String Dim AttachmentFile As String TempVars!DataPass = Me.Assignment_ID.Value Subject = "SUBJECT"...
  9. L

    Multiple attachments stored in DB attached to Email

    Hey all, I am attempting to have an On_Click event call a public sub to attach all the .pdfs stored in a query directly to an email. I keep getting a Too few parameters and I am unsure as to why, I have tried multiple ways to fix this, including different ways of pulling the records needed. In...
  10. L

    Solved OpenReport and Criteria

    @theDBguy Turns out that was a great call, doing this allowed me to find that the reason the reports were blank had nothing to do with the code, apparently in my test cases I was leaving one specific field blank that was effectively causing the query to return no records. Upon discovering this I...
  11. L

    Solved OpenReport and Criteria

    Do you think coding in running the query before opening the report might resolve this?
  12. L

    Solved OpenReport and Criteria

    @theDBguy I would honestly have to make a completely fake DB as even the field names and calculations I can not distribute as they contain information that is covered by an NDA. @pbaldy I attempted that, and just to be sure I did this correctly the code is below, but it still generates an empty...
  13. L

    Solved OpenReport and Criteria

    So if I change the code to: DoCmd.OpenReport ReportName, acViewPreview, , "Assignment ID=" & TempVars!DataPass, acHidden Then I get a missing operator syntax error. I (possibly incorrectly) assumed that the issue was it was not properly referencing the field, so I coded it to reference the...
  14. L

    Solved OpenReport and Criteria

    If I do not hide the report it just pops up the same blank report. I am positive the tempvar is functional because if I change the where criteria to "Assignment ID=" & TempVars!DataPass I can see the proper data in the missing operator error box. See the full report export code below...
  15. L

    Solved OpenReport and Criteria

    Hello all, I am trying to export a filtered report on button click. For some reason the filter does not work, and it exports a blank report. Please find the code below. Any help would be appreciated. DoCmd.OpenReport ReportName, acViewPreview, , "[Assignment Details].[Assignment ID]=" &...
Top Bottom