Click or drag to resize

IFindAppointments Method

Find collection of Appointments for a particular associate between two dates Get a collection of Appointments for a given associate within a specified range of dates

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
SOAppointments Appointments(
	int assoc,
	DateTime FromDate,
	DateTime ToDate
)

Parameters

assoc
Type: SystemInt32
Associate id
FromDate
Type: SystemDateTime
Earliest date for the search (inclusive)
ToDate
Type: SystemDateTime
Latest date for the search (inclusive)

Return Value

Type: SOAppointments
SOAppointments a collection of appointments for a particular associate
Examples

Appointments

This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.

This will count all appointments in the given time range

VB
Dim objSO
Dim objFind
Dim objAppoint
Dim objA

Set objSO = CreateObject("SuperOfficeDB.Database")
If not (objSO is nothing) Then
    objSO.login "<USERID>", "<password>"
    set objFind = objSO.Find
    set objAppoint = objFind.Appointments(objSO.UserAssociateId, #1/1/2000#, #12/31/2000#)
    Set objA = objAppoint.GetFirst
    no = 0
    While Not objAppoint.EOF
        no = no + 1
        Set objA = objAppoint.GetNext
    Wend
    MsgBox "There were " & no & " appointments in the given time range for user with associate_id = " & objSO.UserAssociateID
Else
    MsgBox "Could not log in"
End If
Set objSO = Nothing

See Also