How does txtResult get its data from the module? What is the Control Source
of txtResult? If txtResult is bound to a field, is the field defined in the
table as Nulls not allowed (i.e. Required = Yes)? Where is the module
located, is it in the form that has these two textboxes? What is the error
that you get?
There are two typos in the example you gave (a space after IsNull and an
extra ")"), it should be:
If IsNull(Me.mytxt ) Then
Me.txtresult = Null
'other lines
End If
--
Wayne Morgan
MS Access MVP
"jpr" <jp***@tin.it > wrote in message
news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
Hello,
I have a form with twa txtboxes named mytxt and txtresult.
The txtresult gets its data from a module (GetInterval).
I have written this statement:
If IsNull (Me.mytxt) then
Me.txtresult) = Null
I get an error as if that control cannot contain null values.
I have done the same with another sample, simply changing the record
source of my txtresult to a field of my table and works?
can anyone see the problem?
I have also tried in with this code but still nothing:
If Len(Trim$(Me!US ER & vbNullString)) = 0 Then
Thanks.