Search results

  1. P

    Solved Empty Array

    Would it work if I Redim'd it to the size of the recordset? Something like: Set rs2 = dbs.OpenRecordset("tmpPaths") Redim vArray(rs2.recordcount)
  2. P

    Solved Empty Array

    I guess I'm just struggling with the incremental part. How do I define the array size appropriately? I've tried doing vArray(i) = Array(vPath), but I usually get either a type mismatch error or object is not set error. The way you showed me earlier did work for an instance of just one record, I...
  3. P

    Solved Empty Array

    @Gasman I am using the index with the recordset as opposed to the array to make sure it cycles through appropriately. It may be unnecessary code, but I wasn't sure and it didn't error 🤔
  4. P

    Solved Empty Array

    @Isaac Yeah I had a feeling I am missing the piece that moves to the next position in the array. I'm new with arrays, so how would I cycle through the recordset and store each "vPath" as a new item in the array?
  5. P

    Solved Empty Array

    So the following code doesn't throw any error, however it is creating an empty array, when there should be 4 array records. Not sure what exactly needs to change, but I'm thinking I'm missing a step to build a complete array rather than resetting the array with each iteration. Dim vArray As...
  6. P

    Solved Building and Updating an Array of Variables from a Recordset

    It took me a bit of debugging, but I got there. Thanks @theDBguy
  7. P

    Solved Building and Updating an Array of Variables from a Recordset

    So if I'm adding the "ePath" variable to the array, obviously it will change each time with the Mgr ID. Would I do ArrayName(i)=ePath to store the variable in the next position in the array?
  8. P

    Solved Building and Updating an Array of Variables from a Recordset

    New problem! I'm trying to build an array that stores a variable each time a loop is done in a recordset. The variable is a file path that is built based on a piece of data from the recordset. How would I make sure the code adds each new variable as the code loops, instead of creating a new...
  9. P

    Solved Saving an Outlook Message Error

    So you do get to come back to Solved :) Good news - it wasn't my code! Woo hoo! Turns out the file I was designating as attach1 was actually corrupted, probably during a first attempt at saving the msg. I restored the file to an earlier version and it is now working. Thank you @Gasman and...
  10. P

    Solved Saving an Outlook Message Error

    Good news is I figured out the array thing (wasn't as bad as I thought it would be). Bad news is I still have the same problem. I was hoping I could trick it (I was wrong )
  11. P

    Solved Saving an Outlook Message Error

    Thanks @Gasman, I'll give that a shot! I'm glad to know at least there isn't anything obvious with my code. I am playing around with the following as a second option, but I'm struggling to figure out how I would pass it my attachment paths...? (Source: Multiple Attachments) ' Add attachments to...
  12. P

    Solved Saving an Outlook Message Error

    No doubt I did something wrong (wouldn't be the first time!) :) I have played with the code a bit since I originally posted, so some of it may look a little different. Step 1: Private Sub cmdLate_Click() Select Case Forms!Homepage.optGroup Case 5 Select Case...
  13. P

    Solved Saving an Outlook Message Error

    Here is what I am getting in the email. I've discovered the .SaveAs doesn't matter. For some reason, when I include a second attachment (in this case, attach1), that Outlook Item gets attached (the exact same one every time). It should be a PowerPoint file. It seems like either Access or...
  14. P

    Solved Saving an Outlook Message Error

    Is the way I did multiple attachments correct? I think I've actually narrowed the problem down to including 2 attachments.
  15. P

    Solved Saving an Outlook Message Error

    Other providing a variable for ePath (which in my code comes from somewhere else), did you make any code changes to what I posted? I tried from Immediate as you did. I was receiving an error "Ambiguous Name Detected ePath", but in researching that error, I can't tell what it means.
  16. P

    Solved Saving an Outlook Message Error

    Unfortunately, it isn't giving any results.
  17. P

    Solved Saving an Outlook Message Error

    I have tried, but I'm not getting anything back. I'm not the best at stepping into yet, so I'm not sure if it's not finding anything because it's one function sending to another
  18. P

    Solved Saving an Outlook Message Error

    Just tried, but no luck. It still attached the saved message instead of the PPTX
  19. P

    Solved Saving an Outlook Message Error

    Sorry, I forgot I took attach1 out of the function call when I was testing. Yes, attach1 would be inserted in between ePath and attach2
  20. P

    Solved Saving an Outlook Message Error

    I have the following functions that are used to generate an Outlook email. It works fine, unless I include an "attach1". Then the email that gets created does not include the attachment I specified as variable "attach1", but instead includes the saved version of the same email. Public Function...
Back
Top Bottom