I have a form. In that form i have a subform and in the subform i have a Function called GetDetails. I am calling that Function in the QuerySave event. When i open a document composed by that form , i get an error “Illegal Parenthesized reference: GetDetails”. Can anyone help me on this.
I am not using any Script Libraries for accessing the function, the Function is decalred in the Globals of the Subform.
The below code is placed in the subform and that subform is placed in the form.
I have declared this function in the Globals of the subform.
Function getdetails(curdoc As NotesDocument,uidoc As NotesUIDocument) As Boolean
Dim CarLine As String
getdetails = True
If curdoc.field1(0) = "" Then
Messagebox {Please Select field1} , 16 , "Error"
Call uidoc.GotoField("field1")
ValidateDocument = False
Exit Function
end if
'FACILITY GUIDELINES
If Not curdoc.HasItem("name") Then
If Cstr(curdoc.name(0)) = "" Or Cstr(curdoc.name(0)) = "0" Then
Messagebox {Please enter the name for the area} , 16 , "Error"
Call uidoc.GotoField("name")
getdetails = False
Exit Function
end if
End If
If Cstr(curdoc.name(0)) = “” Or Cstr(curdoc.name(0)) = “0” Then<–right here
Messagebox {Please enter the name for the area} , 16 , “Error”
Call uidoc.GotoField(“name”)
getdetails = False
Exit Function
end if
If curdoc doesn’t have an item called “name” how can you check to see if it is “” or “0”? It doesn’t exist, so it’s going to throw an illegal reference at you.
Literally, the value of name in that instance is Nothing. It has no value because it isn’t there.
Change that if statement and it should fix your issue.