LOTUSSCRIPT/COM/OLE CLASSES
Examples: FormUsers property
1. This example adds names to the form users field.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim form As NotesForm
Dim newFormUsers(0 To 63) As String
Dim formUser As String
Set db = session.CurrentDatabase
Set form = db.GetForm(Inputbox("Name of form?"))
If Isempty(form.FormUsers) Then
n = 0
Else
For j = 0 To Ubound(form.FormUsers)
newFormUsers(j) = form.FormUsers(j)
Messagebox "Current form user: " & _
newFormUsers(j)
Next
n = Ubound(form.FormUsers) + 1
End If
formUser = Inputbox("Name of form user?")
Do While formUser <> ""
newFormUsers(n) = formUser
formUser = Inputbox("Name of form user?")
n = n + 1
Loop
form.FormUsers = newFormUsers
2. This example replaces the contents of the form users field.
REM Replaces $FORMUSERS in total with what the user specifies here
Dim session As New NotesSession
Dim db As NotesDatabase
Dim form As NotesForm
Dim newFormUsers(0 To 63) As String
Dim formUser As String
Dim emptyFormUsers As Variant
Set db = session.CurrentDatabase
Set form = db.GetForm(Inputbox("Name of form?"))
n = 0
formUser = Inputbox("Name of form user?")
Do While formUser <> ""
newFormUsers(n) = formUser
formUser = Inputbox("Name of formUser?")
n = n + 1
Loop
form.FormUsers = newFormUsers
See Also
FormUsers property
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary