Value does not evaluate to a boolen term

pachjo

Well-known member
Joined
Dec 12, 2006
Messages
370
Programming Experience
10+
I have a loop which contains this code:

Dim dr() = Me.OuwDataSet1.addresses.Select(ro.advice_no, "advice_no")

the first time thru it works without any problem and all my subsequent code works a treat.

However upon the next iteration I get an error stating that the value contained in ro.advice_no does not evaluate to a boolean term?

ro.advice_no is a bigint type

the first run ro.advice_no = 748081 and it works
the second run ro.advice_no = 748082 and I get the error?

I start again....

the first run ro.advice_no = 748082 and it works
the second run ro.advice_no = 748083 and I get the error.

basically the first run always works the second always errors!

any ideas?

Thnx
 
Isn't the first string supposed to be an expression like

"advice_no = 1"

So

"advice_no = " + CStr(ro.advice_no)

or somethin?
 
Dim dr() = Me.OuwDataSet1.addresses.Select(ro.advice_no, "advice_no")


The first param is a string of the value to look for which I presume gets converted on the call, the second is the field to be serached.

As it always works on the first call the conversion of ro.advice_no obviously works ok.

I just can see why it does not work on subsequent calls
 
Oh.......c**p!

I see what you mean!

I am getting confused with the .Find paramaters! PRAT!

Am modifying code now and let you know......:eek:
 

Latest posts

Back
Top