Unsure where to classify this

G

Guest

I want to do the following, I want to create a series of field names so I
can create a report for them, looking 90 days out into the future. This is
the code I want to try, Begin_devel is a date field, time_left is an estimate
to complete. I want dayname to become a series of fields, day1, day2, day3,
day4, etc. out to day90.

a = 1
b = time_left
LOOP while b >= 0
let dayname = "day_" + a
if begin_devel >= (now() + a) then
if weekday(now()+a,2)>5 then work = 0
else work = 2
a = a + 1
b = b - work
%dayname% = work
end



As I am looking at this, I have two questions, the first one - how do I have
to code the %dayname% = work in VBA to get day1 = 2, day2 = 2, day3 = 0, etc.


The second question - since some of these are going to be done less 90
times, how do I make sure every record will have a value for day1, day2, etc.


So, I am quite lost.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top