Hi again
I have added some code to my program and currently get the above error on line
d.Execute "UPDATE Table2 SET Table2.RecAdded=FALSE;",dbFailOnError
Any help appreciated
Bob M
Dunedin
New Zealand
p.s. code and data attached
Hi again
I have added some code to my program and currently get the above error on line
d.Execute "UPDATE Table2 SET Table2.RecAdded=FALSE;",dbFailOnError
Any help appreciated
Bob M
Dunedin
New Zealand
p.s. code and data attached
There is no RecAdded field in table2. More to come after I take a deeper look.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Your comments include "loop through j and c where j = 0 -> 9" If j is 0 then this will also fail
Weights(j, c) = 1 - Abs((t2("PIC" & j)) - j) * DValues(c)
because there is no PIC0 field in your recordset since the table has no PIC0 field.
I used Find to look for SumWeights, which is declared at the procedure level. The next time I found it is in
Sim = SumWeights * 10
so since no value gets assigned to it, the calculation should be 0
If you don't use the record count variable, why create it and assign a value?
Not sure if you realize that everything on this line
Dim i, j, c, TotalDiffs, BigDiffs, X, Y, Z, tmp, RecAdded As Integer
is a variant execpt for RecAdded? You are using the variables in calculations, and if you realized this, you'd be expecting the possibility of all being Null (except for RecAdded) but you don't handle the possibility of Nulls. Thus I'm guessing.
That's all for now, folks!
Hi MicronYour comments include "loop through j and c where j = 0 -> 9" If j is 0 then this will also fail
Weights(j, c) = 1 - Abs((t2("PIC" & j)) - j) * DValues(c)
because there is no PIC0 field in your recordset since the table has no PIC0 field.
I used Find to look for SumWeights, which is declared at the procedure level. The next time I found it is in
Sim = SumWeights * 10
so since no value gets assigned to it, the calculation should be 0
If you don't use the record count variable, why create it and assign a value?
Not sure if you realize that everything on this line
Dim i, j, c, TotalDiffs, BigDiffs, X, Y, Z, tmp, RecAdded As Integer
is a variant execpt for RecAdded? You are using the variables in calculations, and if you realized this, you'd be expecting the possibility of all being Null (except for RecAdded) but you don't handle the possibility of Nulls. Thus I'm guessing.
That's all for now, folks!
Many thanks for excellent feedback
I shall address each of your comments and see how we go
Bob M