M
Mark A. Sam
Was causing the script to abort and put an error message on the
Dick,
I said Null, even though [TrailerLength] is a text field. This is becuase
it has been my experience that you don't know if "Access" will look at a
text field as Null or Empty. I always make a test in VBA saying if
IsNull([someField]) or [someField] = "" then...
This is another problem where you would assume a text field would default as
"" but that can't be trusted. Here I debugged it to show me the value is ""
and not Null. The value for [TrailerLength] could will be a number, combo
of Alpahnumeric (45'), 0, or "", never Null. This has been the case all
along and the code has worked to strip out Zeros. Now I am populating with
Zeros which is fine. Now the form is delivering all of the records without
any errors.
God Bless,
Mark
I'd be willing to bet that you are misinterpreting what's going on here.
I don't know exactly what line of code is is the ultimate cause of the
error, but *neither* of these conditions:
will evaluate to True if rs("TrailerLength") is Null. Never would. So
possibly there's a flaw in your logic that assumes that tlength has been
set to some particular value, when in fact it hasn't. If the error
wasn't revealed before, maybe it was due to a difference in the data
coming in via the recordset.
Dick,
I said Null, even though [TrailerLength] is a text field. This is becuase
it has been my experience that you don't know if "Access" will look at a
text field as Null or Empty. I always make a test in VBA saying if
IsNull([someField]) or [someField] = "" then...
This is another problem where you would assume a text field would default as
"" but that can't be trusted. Here I debugged it to show me the value is ""
and not Null. The value for [TrailerLength] could will be a number, combo
of Alpahnumeric (45'), 0, or "", never Null. This has been the case all
along and the code has worked to strip out Zeros. Now I am populating with
Zeros which is fine. Now the form is delivering all of the records without
any errors.
God Bless,
Mark