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