Re: HELP !!! - Complex scan with DATES and SunDialServices DateTran table




oh well,
I was hoping for help without having to DISPLAY my ineptness...
:-(

HTH !!!

bgn_tbl.open(":PRIV:BDates")
cFlow_tbl.open("CASHFLOW")
cFlow_tbl.edit()

scan bgn_tbl:

st = bgn_tbl.StreetCode
bgn = bgn_tbl.BgnDate
end = bgn_tbl.EndDate
day = bgn_tbl.Day
last = bgn_tbl.DaysInMonth
month = bgn_tbl.MonthNumber

if cFlow_tbl.locate("StreetCode",st, "BgnDate",
bgn, "EndDate", end) then
st_c = cFlow_tbl.StreetCode
bgn_c = cFlow_tbl.BgnDate
end_c = cFlow_tbl.EndDate
daily = cFlow_tbl.DailyCost

if bgn_tbl.TheDate = bgn_c then
if bgn_tbl.MonthNumber = 1 then
cFlow_tbl.Jan = cFlow_tbl.Jan +
(daily * (day/last)) * 22
endif
ongoing for months 2 - 12...


"Steven Green" <greens@xxxxxxxxxxxxx> wrote:
my scan is not working at all except to update the Month fields with $0.00

it's kinda hard to troubleshoot a scan that we can't see..


--
Steven Green - Waldorf Maryland USA

Diamond Software Group
http://www.diamondsg.com/main.htm
Paradox Support & Sales - Corel CTech Paradox

Diamond Sports Gems
http://www.diamondsg.com/gemsmain.htm
Sports Memorabilia and Trading Cards
"JeaNette" <harrisjr@xxxxxxxx> wrote in message
news:44d8e482$1@xxxxxxxxxxxxxxxxxxxxxxxxxxx

I am having a mental spiral down and need some help - Brain freeze...

I'm pretty sure this is simple but I can't even get started
I have:
Code #
bgnDate
endDate
dailyCost ( pre-calculated )

using SunDialServices DateTran.db for
TheDate, MonthNumber, Day, DaysInMonth

I have selected a subset of records from DateTran for the exact Day for

every
bgnDate with the above info

I have selected a subset of records from DateTran for the exact Day for

every
endDate with the above info

I have selected a subset of records from DateTran for every month (Day
1)
between the bgnEnd and endDate via Code with the above info

User will enter the bgn & end Dates.
NEED TO scan PRIV tables to calculate money amounts via Code by Month
to
be stored in a WORK table.
EX if Code = 040568 & bgnDate = 1/1/04 and endDate = 4/15/07 then
Jan = dailyCost * ( 1/31 * 22 ) : the Jan tbl_field would have this amount
for 2004 + 2005 + 2006 + 2007
( dailyCost times Jan 1 divided by days in month times working
days of 22 which is the # I was told to use )

Apr = dailyCost * ( 1/30 * 22 ) the Apr tbl_field would have this amount
for 2004 + 2005 + 2006 +
dailyCost * ( 15/30 * 22 ) for 2007

my scan is not working at all except to update the Month fields with $0.00

HELP ! HELP! HELP!







.



Relevant Pages