Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access to LS Function()

Status
Not open for further replies.

fishkake

MIS
Feb 11, 2004
130
GB
have written this function:

Function getRegionDocumentID(rname As String)As String
Dim s As New NotesSession
Dim thisdb As NotesDatabase
Dim Internaldb As NotesDatabase
Dim ndc As NotesDocumentCollection
Set thisdb = s.CurrentDatabase
Set Internaldb = s.GetDatabase(thisdb.Server, "Internal.nsf", False)
searchformula$ = {RegionName="}+country+{"}
Set ndc = internaldb.Search(searchformula$, Nothing, 0)
If ndc.Count<>1 Then
Messagebox ( "An Error has occurred" )
Goto jump
End If
getRegionDocumentID=ndc.GetFirstDocument.UNID

jump:
End Function

Now, as I understand it, this means that I should now be able to call this method with a simple String = getRegionDocumentID(String) and retrieve the value of the function. Hence this button:

Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim regiondocid As String
Set uidoc = ws.CurrentDocument
Forall x In uidoc.Document.Regions
regiondocid = getRegionDocumentID(x)
Call uidoc.FieldAppendText("RegionUNIDs", regiondocid + "; ")
End Forall
End Sub

But it won't compile, it tells me that there's an illegal parenthesized reference, and points t the line with my function call on it! Any help appreciated!

Chris
 
Simply put a remark tag on the line where you do the function call, save the code, then remove the remark tag and save again.
That should do the trick.

Pascal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top