I have created a form using Word 2007 that queries an Access database. If the Access field, LT_Cases is null, I am trying to replace it with the text "None Given". Here is the code I have tried so far. I have used each block of commented code, separately, but to no avail. I get runtime error 94: invalid use of Null. Any help will be greatly appreciated.
Code:
'*****Add formatting for table*****
.TypeText Text:="RE: "
.TypeText Text:=txtAppellant.Value
.MoveRight unit:=wdCell
.TypeText Text:="v. " & txtAppellee.Value
.MoveLeft unit:=wdCell
.MoveDown unit:=wdLine, Count:=2
.TypeText Text:="Docket No: " & txtCaseNumber.Value
.MoveDown unit:=wdLine, Count:=1
.TypeText Text:="Lower Tribunal Case No.: " & txtLowerTrib.Value
' If IsNull(CoverLetter.txtLowerTrib.Value) Then
' CoverLetter.txtLowerTrib.Value = "None Given"
' .TypeParagraph
' .TypeParagraph
' End If
' If Len(CoverLetter.txtLowerTrib & "") = 0 Then
' CoverLetter.txtLowerTrib.Value = "None Given"
' .TypeParagraph
' .TypeParagraph
' End If
' =IIf(IsNull([LT_Cases]) or[LT_Cases] = ""),"None Given",[LT_Cases])