Solved Empty Array (1 Viewer)

pooldead

Registered User.
Local time
Today, 12:44
Joined
Sep 4, 2019
Messages
136
I did double-check for an empty value and there are none, but that's a good callout. When I create the recordset, I'll be sure to accommodate for that.

I'll try to restate:
I am building a database that our team uses to perform access reviews of certain applications. This is a version 2 of a database that I created last year, however I've learned a lot since then (including normalizing) and am rebuilding. In the process of the review, if we have managers who have not responded after a certain amount of time, we send an email to our boss as an escalation. In this escalation email, she wants to see the Managers' ID and include the spreadsheet we sent each manager, as well as our last email attempt. The paths to these two files are stored in a single-column table called "tblPaths" (original, right?).

My goal is to call each path from "tblPaths" into an array, that is then used to add each file as an attachment in an Outlook email. Yesterday @theDBguy helped me get to a point where this runs with one Manager, but when I tried to expand it to two Managers, I ran into all these issues.

I should note, when @theDBguy was helping me yesterday, I was not yet storing those paths in a table. Instead I was just building the path in VBA and assigning directly to the array (which was vArray = Array(path1, path2)).
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:44
Joined
Sep 21, 2011
Messages
14,237
Why are you even using GetRows()?
I would have thought you would need the recordcount ?
 

pooldead

Registered User.
Local time
Today, 12:44
Joined
Sep 4, 2019
Messages
136
I tried with recordcount too, but the variant that was returned was not equaling the actual count (x = rs2.recordcount, x should = 4, but instead was =1 every time)
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:44
Joined
Sep 21, 2011
Messages
14,237
I tried with recordcount too, but the variant that was returned was not equaling the actual count (x = rs2.recordcount, x should = 4, but instead was =1 every time)
You need to MoveLast then MoveFirst to get the recordcount as when you open the file you will be on the first record?
 

pooldead

Registered User.
Local time
Today, 12:44
Joined
Sep 4, 2019
Messages
136
@Gasman FTW! Although, honestly everyone, thank you sooo much for sticking with me! I am self-taught with Access and VBA, and countless times you guys have saved me. I appreciate all the help given here today!
 

Gasman

Enthusiastic Amateur
Local time
Today, 20:44
Joined
Sep 21, 2011
Messages
14,237
@Gasman FTW! Although, honestly everyone, thank you sooo much for sticking with me! I am self-taught with Access and VBA, and countless times you guys have saved me. I appreciate all the help given here today!
You are going to have to tell me what FTW means in your context. I had a quick Google and there are at least 79 variations? :)
 

Users who are viewing this thread

Top Bottom