Hi,
I am developing an application in Access 2003 and am re-using a Class module (LoFund) that has been written by somebody else.
In the following piece of code I get an 'Object variable or With block variable not set' error on the lofund.AddValTransaction line. It doesnt even step into that function.
I have tried replacing all the argument variables with static values and I get the same problem. The "set lofund =" line earlier completed fine so I assume the class is initialised ok.
Any ideas?
Thanks
Daniel
I am developing an application in Access 2003 and am re-using a Class module (LoFund) that has been written by somebody else.
In the following piece of code I get an 'Object variable or With block variable not set' error on the lofund.AddValTransaction line. It doesnt even step into that function.
I have tried replacing all the argument variables with static values and I get the same problem. The "set lofund =" line earlier completed fine so I assume the class is initialised ok.
Any ideas?
Code:
Do While Not mrsShdwFunds.EOF
Set loFund = GetShdwFund(mrsShdwFunds!sFundCd, mrsShdwFunds!sAltFundCd, rsTran!TRANS_DT, rsTran!UNIT_PRICE_DT, rsRates, moOrigFund)
dblPrem = Rounding(lfVal * mrsShdwFunds!fPerc, 2)
loFund.AddValTransaction rsTran!LAST_UP_MOVE_DT, dblPrem, _
rsTran!TRANS_CD, rsTran!TRANS_TYPE, rsTran!UNIT_PRICE_DT
mrsShdwFunds.MoveNext
Loop
Thanks
Daniel