2013-10-12 10:56:41 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
2013-10-27 15:05:18 +01:00
|
|
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Form" script:language="StarBasic">REM =======================================================================================================================
|
|
|
|
REM === The Access2Base library is a part of the LibreOffice project. ===
|
|
|
|
REM === Full documentation is available on http://www.access2base.com ===
|
|
|
|
REM =======================================================================================================================
|
|
|
|
|
|
|
|
Option Compatible
|
2013-10-12 10:56:41 +02:00
|
|
|
Option ClassModule
|
|
|
|
|
|
|
|
Option Explicit
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
REM --- CLASS ROOT FIELDS ---
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Private _Type As String ' Must be FORM
|
|
|
|
Private _Shortcut As String
|
|
|
|
Private _Name As String
|
|
|
|
Private _IsLoaded As Boolean
|
|
|
|
Private _OpenArgs As Variant
|
|
|
|
Public Component As Object ' com.sun.star.text.TextDocument
|
|
|
|
Public ContainerWindow As Object ' (No name)
|
|
|
|
Public DatabaseForm As Object ' com.sun.star.form.component.DataForm and com.sun.star.sdb.ResultSet (a.o.)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
REM --- CONSTRUCTORS / DESTRUCTORS ---
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Private Sub Class_Initialize()
|
|
|
|
_Type = OBJFORM
|
|
|
|
_Shortcut = ""
|
|
|
|
_Name = ""
|
|
|
|
_IsLoaded = False
|
|
|
|
_OpenArgs = ""
|
|
|
|
Set Component = Nothing
|
|
|
|
Set ContainerWindow = Nothing
|
|
|
|
Set DatabaseForm = Nothing
|
|
|
|
End Sub ' Constructor
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
'Private Sub Class_Terminate()
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
REM --- CLASS GET/LET/SET PROPERTIES ---
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get AllowAdditions() As Variant
|
|
|
|
AllowAdditions = _PropertyGet("AllowAdditions")
|
|
|
|
End Property ' AllowAdditions (get)
|
|
|
|
|
|
|
|
Property Let AllowAdditions(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("AllowAdditions", pvValue)
|
|
|
|
End Property ' AllowAdditions (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get AllowDeletions() As Variant
|
|
|
|
AllowDeletions = _PropertyGet("AllowDeletions")
|
|
|
|
End Property ' AllowDeletions (get)
|
|
|
|
|
|
|
|
Property Let AllowDeletions(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("AllowDeletions", pvValue)
|
|
|
|
End Property ' AllowDeletions (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get AllowEdits() As Variant
|
|
|
|
AllowEdits = _PropertyGet("AllowEdits")
|
|
|
|
End Property ' AllowEdits (get)
|
|
|
|
|
|
|
|
Property Let AllowEdits(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("AllowEdits", pvValue)
|
|
|
|
End Property ' AllowEdits (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get Bookmark() As Variant
|
|
|
|
Bookmark = _PropertyGet("Bookmark")
|
|
|
|
End Property ' Bookmark (get)
|
|
|
|
|
|
|
|
Property Let Bookmark(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Bookmark", pvValue)
|
|
|
|
End Property ' Bookmark (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get Caption() As Variant
|
|
|
|
Caption = _PropertyGet("Caption")
|
|
|
|
End Property ' Caption (get)
|
|
|
|
|
|
|
|
Property Let Caption(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Caption", pvValue)
|
|
|
|
End Property ' Caption (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get CurrentRecord() As Variant
|
|
|
|
CurrentRecord = _PropertyGet("CurrentRecord")
|
|
|
|
End Property ' CurrentRecord (get)
|
|
|
|
|
|
|
|
Property Let CurrentRecord(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("CurrentRecord", pvValue)
|
|
|
|
End Property ' CurrentRecord (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get Filter() As Variant
|
|
|
|
Filter = _PropertyGet("Filter")
|
|
|
|
End Property ' Filter (get)
|
|
|
|
|
|
|
|
Property Let Filter(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Filter", pvValue)
|
|
|
|
End Property ' Filter (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get FilterOn() As Variant
|
|
|
|
FilterOn = _PropertyGet("FilterOn")
|
|
|
|
End Property ' FilterOn (get)
|
|
|
|
|
|
|
|
Property Let FilterOn(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("FilterOn", pvValue)
|
|
|
|
End Property ' FilterOn (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get Height() As Variant
|
|
|
|
Height = _PropertyGet("Height")
|
|
|
|
End Property ' Height (get)
|
|
|
|
|
|
|
|
Property Let Height(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Height", pvValue)
|
|
|
|
End Property ' Height (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
2013-10-27 15:05:18 +01:00
|
|
|
Function IsLoaded() As Boolean
|
2013-10-12 10:56:41 +02:00
|
|
|
'Return True if form open
|
|
|
|
|
2013-10-27 15:05:18 +01:00
|
|
|
If _ErrorHandler() Then On Local Error Goto Error_Function
|
2013-10-12 10:56:41 +02:00
|
|
|
Utils._SetCalledSub("Form.getIsLoaded")
|
|
|
|
If _IsLoaded Then ' For performance reasons, a form object, once detected as loaded, is presumed remaining loaded
|
|
|
|
IsLoaded = True
|
2013-10-27 15:05:18 +01:00
|
|
|
Goto Exit_Function
|
2013-10-12 10:56:41 +02:00
|
|
|
End If
|
|
|
|
IsLoaded = False
|
|
|
|
|
|
|
|
Dim oDatabase As Object, oEnum As Object, oDesk As Object, oComp As Object, bFound As Boolean
|
|
|
|
Dim i As Integer
|
|
|
|
Set oDatabase = Application._CurrentDb()
|
|
|
|
Set oDesk = CreateUnoService("com.sun.star.frame.Desktop")
|
|
|
|
Set oEnum = oDesk.Components().createEnumeration
|
|
|
|
bFound = False
|
|
|
|
While oEnum.hasMoreElements And Not bFound ' Search in all open components if one corresponds with current form
|
|
|
|
oComp = oEnum.nextElement
|
|
|
|
Select Case oDatabase._Standalone
|
|
|
|
Case False
|
|
|
|
If HasUnoInterfaces(oComp, "com.sun.star.frame.XModule") Then
|
|
|
|
If oComp.Identifier = "com.sun.star.sdb.FormDesign" Then
|
|
|
|
For i = 0 To UBound(oComp.Args())
|
|
|
|
If oComp.Args(i).Name = "DocumentTitle" Then
|
|
|
|
bFound = ( oComp.Args(i).Value = _Name )
|
|
|
|
If bFound Then
|
|
|
|
_IsLoaded = True
|
|
|
|
Set Component = oComp
|
|
|
|
Exit For
|
|
|
|
End If
|
|
|
|
End If
|
|
|
|
Next i
|
|
|
|
End If
|
|
|
|
End If
|
|
|
|
Case True
|
|
|
|
If Utils._hasUNOProperty(oComp, "ImplementationName") Then
|
|
|
|
If oComp.ImplementationName = "SwXTextDocument" Then
|
|
|
|
If oComp.Title = oDatabase.Title Then
|
|
|
|
_IsLoaded = True
|
|
|
|
Set Component = oDatabase.Document ' Form
|
|
|
|
End If
|
|
|
|
End If
|
|
|
|
End If
|
|
|
|
End Select
|
|
|
|
Wend
|
|
|
|
Set oComp = Nothing
|
|
|
|
IsLoaded = _IsLoaded
|
|
|
|
|
2013-10-27 15:05:18 +01:00
|
|
|
Exit_Function:
|
2013-10-12 10:56:41 +02:00
|
|
|
Utils._ResetCalledSub("Form.getIsLoaded")
|
2013-10-27 15:05:18 +01:00
|
|
|
Exit Function
|
|
|
|
Error_Function:
|
2013-10-12 10:56:41 +02:00
|
|
|
TraceError(TRACEABORT, Err, "Form.getIsLoaded", Erl)
|
2013-10-27 15:05:18 +01:00
|
|
|
GoTo Exit_Function
|
|
|
|
End Function
|
2013-10-12 10:56:41 +02:00
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get Name() As String
|
|
|
|
Name = _PropertyGet("Name")
|
|
|
|
End Property ' Name (get)
|
|
|
|
|
|
|
|
Public Function pName() As String ' For compatibility with < V0.9.0
|
|
|
|
pName = _PropertyGet("Name")
|
|
|
|
End Function ' pName (get)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get ObjectType() As String
|
|
|
|
ObjectType = _PropertyGet("ObjectType")
|
|
|
|
End Property ' ObjectType (get)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get OpenArgs() As Variant
|
|
|
|
OpenArgs = _PropertyGet("OpenArgs")
|
|
|
|
End Property ' OpenArgs (get)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Public Function OptionGroup(ByVal Optional pvGroupName As Variant) As Variant
|
|
|
|
' Return either an error or an object of type OPTIONGROUP based on its name
|
|
|
|
|
|
|
|
Utils._SetCalledSub("Form.OptionGroup")
|
|
|
|
If IsMissing(pvGroupName) Then Call _TraceArguments()
|
|
|
|
If _ErrorHandler() Then On Local Error Goto Error_Function
|
|
|
|
|
|
|
|
Set OptionGroup = _OptionGroup(pvGroupName, CTLPARENTISFORM, DatabaseForm, Component)
|
|
|
|
|
|
|
|
Exit_Function:
|
|
|
|
Utils._ResetCalledSub("Form.OptionGroup")
|
|
|
|
Exit Function
|
|
|
|
Error_Function:
|
|
|
|
TraceError(TRACEABORT, Err, "Form.OptionGroup", Erl)
|
|
|
|
GoTo Exit_Function
|
|
|
|
End Function ' OptionGroup
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Public Function Properties(ByVal Optional pvIndex As Variant) As Variant
|
|
|
|
' Return
|
|
|
|
' a Collection object if pvIndex absent
|
|
|
|
' a Property object otherwise
|
|
|
|
|
|
|
|
Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
|
|
|
|
vPropertiesList = _PropertiesList()
|
|
|
|
sObject = Utils._PCase(_Type)
|
|
|
|
If IsMissing(pvIndex) Then
|
|
|
|
vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList)
|
|
|
|
Else
|
|
|
|
vProperty = PropertiesGet._Properties(sObject, _Name, vPropertiesList, pvIndex)
|
|
|
|
vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
|
|
|
|
End If
|
|
|
|
|
|
|
|
Exit_Function:
|
|
|
|
Set Properties = vProperty
|
|
|
|
Exit Function
|
|
|
|
End Function ' Properties
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get Recordset() As Object
|
|
|
|
Recordset = _PropertyGet("Recordset")
|
|
|
|
End Property ' Recordset (get) V0.9.5
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get RecordSource() As Variant
|
|
|
|
RecordSource = _PropertyGet("RecordSource")
|
|
|
|
End Property ' RecordSource (get)
|
|
|
|
|
|
|
|
Property Let RecordSource(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("RecordSource", pvValue)
|
|
|
|
End Property ' RecordSource (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get Visible() As Variant
|
|
|
|
Visible = _PropertyGet("Visible")
|
|
|
|
End Property ' Visible (get)
|
|
|
|
|
|
|
|
Property Let Visible(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Visible", pvValue)
|
|
|
|
End Property ' Visible (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Property Get Width() As Variant
|
|
|
|
Width = _PropertyGet("Width")
|
|
|
|
End Property ' Width (get)
|
|
|
|
|
|
|
|
Property Let Width(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Width", pvValue)
|
|
|
|
End Property ' Width (set)
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
REM --- CLASS METHODS ---
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Public Function mClose() As Variant
|
|
|
|
' Close the form
|
|
|
|
|
|
|
|
If _ErrorHandler() Then On Local Error Goto Error_Function
|
|
|
|
Utils._SetCalledSub("Form.Close")
|
|
|
|
mClose = False
|
|
|
|
If _TraceStandalone() Then Goto Exit_Function
|
|
|
|
|
|
|
|
Dim oController As Object
|
|
|
|
Set oController = Application.CurrentDb().Document.getFormDocuments.getByName(_Name)
|
|
|
|
oController.close()
|
|
|
|
mClose = True
|
|
|
|
|
|
|
|
Exit_Function:
|
|
|
|
Utils._ResetCalledSub("Form.Close")
|
|
|
|
Exit Function
|
|
|
|
Error_Function:
|
|
|
|
TraceError(TRACEABORT, Err, "Form.Close", Erl)
|
|
|
|
GoTo Exit_Function
|
|
|
|
End Function
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Public Function Controls(Optional ByVal pvIndex As Variant) As Variant
|
|
|
|
' Return a Control object with name or index = pvIndex
|
|
|
|
|
|
|
|
If _ErrorHandler() Then On Local Error Goto Error_Function
|
|
|
|
Utils._SetCalledSub("Form.Controls")
|
|
|
|
|
|
|
|
Dim ocControl As Variant, sParentShortcut As String, iControlCount As Integer
|
|
|
|
Dim oCounter As Variant, sControls() As Variant, i As Integer, bFound As Boolean, sIndex As String
|
|
|
|
Dim j As Integer
|
|
|
|
|
|
|
|
Set ocControl = Nothing
|
|
|
|
If Not IsLoaded Then Goto Trace_Error_NotOpen
|
|
|
|
Set ocControl = New Control
|
|
|
|
ocControl._ParentType = CTLPARENTISFORM
|
|
|
|
sParentShortcut = _Shortcut
|
|
|
|
iControlCount = DatabaseForm.getCount()
|
|
|
|
|
|
|
|
If IsMissing(pvIndex) Then ' No argument, return Collection pseudo-object
|
|
|
|
Set oCounter = New Collect
|
|
|
|
oCounter._CollType = COLLCONTROLS
|
|
|
|
oCounter._ParentType = OBJFORM
|
|
|
|
oCounter._ParentName = _Name
|
|
|
|
oCounter._Count = iControlCount
|
|
|
|
Set Controls = oCounter
|
|
|
|
Goto Exit_Function
|
|
|
|
End If
|
|
|
|
|
|
|
|
If Not Utils._CheckArgument(pvIndex, 1, Utils._AddNumeric(vbString)) Then Goto Exit_Function
|
|
|
|
|
|
|
|
' Start building the ocControl object
|
|
|
|
' Determine exact name
|
|
|
|
sControls() = DatabaseForm.getElementNames()
|
|
|
|
|
|
|
|
Select Case VarType(pvIndex)
|
|
|
|
Case vbInteger, vbLong, vbSingle, vbDouble, vbCurrency, vbBigint, vbDecimal
|
|
|
|
If pvIndex < 0 Or pvIndex > iControlCount - 1 Then Goto Trace_Error_Index
|
|
|
|
ocControl._Name = sControls(pvIndex)
|
|
|
|
Case vbString ' Check control name validity (non case sensitive)
|
|
|
|
bFound = False
|
|
|
|
sIndex = UCase(Utils._Trim(pvIndex))
|
|
|
|
For i = 0 To iControlCount - 1
|
|
|
|
If UCase(sControls(i)) = sIndex Then
|
|
|
|
bFound = True
|
|
|
|
Exit For
|
|
|
|
End If
|
|
|
|
Next i
|
|
|
|
If bFound Then ocControl._Name = sControls(i) Else Goto Trace_NotFound
|
|
|
|
End Select
|
|
|
|
|
|
|
|
ocControl._Shortcut = sParentShortcut & "!" & Utils._Surround(ocControl._Name)
|
|
|
|
Set ocControl.ControlModel = DatabaseForm.getByName(ocControl._Name)
|
|
|
|
ocControl._ImplementationName = ocControl.ControlModel.getImplementationName()
|
|
|
|
ocControl._FormComponent = Component
|
|
|
|
If Utils._hasUNOProperty(ocControl.ControlModel, "ClassId") Then ocControl._ClassId = ocControl.ControlModel.ClassId
|
|
|
|
If ocControl._ClassId > 0 And ocControl._ClassId <> acHiddenControl Then
|
|
|
|
Set ocControl.ControlView = Component.CurrentController.getControl(ocControl.ControlModel)
|
|
|
|
End If
|
|
|
|
|
|
|
|
ocControl._Initialize()
|
|
|
|
Set Controls = ocControl
|
|
|
|
|
|
|
|
Exit_Function:
|
|
|
|
Utils._ResetCalledSub("Form.Controls")
|
|
|
|
Exit Function
|
|
|
|
Trace_Error:
|
|
|
|
TraceError(TRACEFATAL, ERRWRONGARGUMENT, Utils._CalledSub(), 0, , iArg)
|
|
|
|
Set Controls = Nothing
|
|
|
|
Goto Exit_Function
|
|
|
|
Trace_Error_NotOpen:
|
|
|
|
TraceError(TRACEFATAL, ERRFORMNOTOPEN, Utils._CalledSub(), 0, , _Name)
|
|
|
|
Set Controls = Nothing
|
|
|
|
Goto Exit_Function
|
|
|
|
Trace_Error_Index:
|
|
|
|
TraceError(TRACEFATAL, ERRCOLLECTION, Utils._CalledSub(), 0, 1)
|
|
|
|
Set Controls = Nothing
|
|
|
|
Goto Exit_Function
|
|
|
|
Trace_NotFound:
|
|
|
|
TraceError(TRACEFATAL, ERRCONTROLNOTFOUND, Utils._CalledSub(), 0, , Array(pvIndex, pvIndex))
|
|
|
|
Set Controls = Nothing
|
|
|
|
Goto Exit_Function
|
|
|
|
Error_Function:
|
|
|
|
TraceError(TRACEABORT, Err, "Form.Controls", Erl)
|
|
|
|
Set Controls = Nothing
|
|
|
|
GoTo Exit_Function
|
|
|
|
End Function ' Controls
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Public Function getProperty(Optional ByVal pvProperty As Variant) As Variant
|
|
|
|
' Return property value of psProperty property name
|
|
|
|
|
|
|
|
Utils._SetCalledSub("Form.getProperty")
|
|
|
|
If IsMissing(pvProperty) Then Call _TraceArguments()
|
|
|
|
getProperty = _PropertyGet(pvProperty)
|
|
|
|
Utils._ResetCalledSub("Form.getProperty")
|
|
|
|
|
|
|
|
End Function ' getProperty
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Public Function hasProperty(ByVal Optional pvProperty As Variant) As Boolean
|
|
|
|
' Return True if object has a valid property called pvProperty (case-insensitive comparison !)
|
|
|
|
|
|
|
|
If IsMissing(pvProperty) Then hasProperty = PropertiesGet._hasProperty(_Type, _PropertiesList()) Else hasProperty = PropertiesGet._hasProperty(_Type, _PropertiesList(), pvProperty)
|
|
|
|
Exit Function
|
|
|
|
|
|
|
|
End Function ' hasProperty
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Public Function Move( ByVal Optional pvLeft As Variant _
|
|
|
|
, ByVal Optional pvTop As Variant _
|
|
|
|
, ByVal Optional pvWidth As Variant _
|
|
|
|
, ByVal Optional pvHeight As Variant _
|
|
|
|
) As Variant
|
|
|
|
' Execute Move method
|
|
|
|
Utils._SetCalledSub("Form.Move")
|
|
|
|
If IsMissing(pvLeft) Then Call _TraceArguments()
|
|
|
|
If _ErrorHandler() Then On Local Error Goto Error_Function
|
|
|
|
Move = False
|
|
|
|
Dim iArgNr As Integer
|
|
|
|
Select Case UCase(_A2B_.CalledSub)
|
|
|
|
Case UCase("Move") : iArgNr = 1
|
|
|
|
Case UCase("Form.Move") : iArgNr = 0
|
|
|
|
End Select
|
|
|
|
If IsMissing(pvLeft) Then Call _TraceArguments()
|
|
|
|
If IsMissing(pvTop) Then pvTop = -1
|
|
|
|
If IsMissing(pvWidth) Then pvWidth = -1
|
|
|
|
If IsMissing(pvHeight) Then pvHeight = -1
|
|
|
|
If Not Utils._CheckArgument(pvLeft, iArgNr + 1, Utils._AddNumeric()) Then Goto Exit_Function
|
|
|
|
If Not Utils._CheckArgument(pvTop, iArgNr + 2, Utils._AddNumeric()) Then Goto Exit_Function
|
|
|
|
If Not Utils._CheckArgument(pvWidth, iArgNr + 3, Utils._AddNumeric()) Then Goto Exit_Function
|
|
|
|
If Not Utils._CheckArgument(pvHeight, iArgNr + 4, Utils._AddNumeric()) Then Goto Exit_Function
|
|
|
|
|
|
|
|
Dim iArg As Integer ' Check arguments values
|
|
|
|
iArg = 0
|
|
|
|
If pvHeight < -1 Then iArg = 4 : If pvWidth < -1 Then iArg = 3
|
|
|
|
If pvTop < -1 Then iArg = 2 : If pvLeft < -1 Then iArg = 1
|
|
|
|
If iArg > 0 Then
|
|
|
|
TraceError(TRACEFATAL, ERRWRONGARGUMENT, Utils._CalledSub(), 0, 1, iArgNr + iArg)
|
|
|
|
Goto Exit_Function
|
|
|
|
End If
|
|
|
|
|
|
|
|
Dim iPosSize As Integer
|
|
|
|
iPosSize = 0
|
|
|
|
If pvLeft >= 0 Then iPosSize = iPosSize + com.sun.star.awt.PosSize.X
|
|
|
|
If pvTop >= 0 Then iPosSize = iPosSize + com.sun.star.awt.PosSize.Y
|
|
|
|
If pvWidth > 0 Then iPosSize = iPosSize + com.sun.star.awt.PosSize.WIDTH
|
|
|
|
If pvHeight > 0 Then iPosSize = iPosSize + com.sun.star.awt.PosSize.HEIGHT
|
2013-10-27 15:05:18 +01:00
|
|
|
If iPosSize > 0 Then
|
|
|
|
If Utils._hasUNOProperty(ContainerWindow, "IsMaximized") Then ' Ignored when <= OO3.2
|
|
|
|
ContainerWindow.IsMaximized = False
|
|
|
|
ContainerWindow.IsMinimized = False
|
|
|
|
End If
|
|
|
|
ContainerWindow.setPosSize(pvLeft, pvTop, pvWidth, pvHeight, iPosSize)
|
|
|
|
End If
|
2013-10-12 10:56:41 +02:00
|
|
|
Move = True
|
|
|
|
|
|
|
|
Exit_Function:
|
|
|
|
Utils._ResetCalledSub("Form.Move")
|
|
|
|
Exit Function
|
|
|
|
Error_Function:
|
|
|
|
TraceError(TRACEABORT, Err, "Form.Move", Erl)
|
|
|
|
GoTo Exit_Function
|
|
|
|
End Function ' Move
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Public Function Refresh() As Boolean
|
|
|
|
' Refresh data with its most recent value in the database in a form or subform
|
|
|
|
Utils._SetCalledSub("Form.Refresh")
|
|
|
|
If _ErrorHandler() Then On Local Error Goto Error_Function
|
|
|
|
Refresh = False
|
|
|
|
|
|
|
|
Dim oSet As Object
|
|
|
|
Set oSet = DatabaseForm.createResultSet()
|
|
|
|
If Not IsNull(oSet) Then
|
|
|
|
oSet.refreshRow()
|
|
|
|
Refresh = True
|
|
|
|
End If
|
|
|
|
|
|
|
|
Exit_Function:
|
|
|
|
Set oSet = Nothing
|
|
|
|
Utils._ResetCalledSub("Form.Refresh")
|
|
|
|
Exit Function
|
|
|
|
Error_Function:
|
|
|
|
TraceError(TRACEABORT, Err, "SubForm.Refresh", Erl)
|
|
|
|
GoTo Exit_Function
|
|
|
|
End Function ' Refresh
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Public Function Requery() As Boolean
|
|
|
|
' Refresh data displayed in a form, subform, combobox or listbox
|
|
|
|
Utils._SetCalledSub("Form.Requery")
|
|
|
|
If _ErrorHandler() Then On Local Error Goto Error_Function
|
|
|
|
Requery = False
|
|
|
|
|
|
|
|
DatabaseForm.reload()
|
|
|
|
Requery = True
|
|
|
|
|
|
|
|
Exit_Function:
|
|
|
|
Utils._ResetCalledSub("Form.Requery")
|
|
|
|
Exit Function
|
|
|
|
Error_Function:
|
|
|
|
TraceError(TRACEABORT, Err, "Form.Requery", Erl)
|
|
|
|
GoTo Exit_Function
|
|
|
|
End Function ' Requery
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Public Function setFocus() As Boolean
|
|
|
|
' Execute setFocus method
|
|
|
|
Utils._SetCalledSub("Form.setFocus")
|
|
|
|
If _ErrorHandler() Then On Local Error Goto Error_Function
|
|
|
|
setFocus = False
|
|
|
|
|
|
|
|
ContainerWindow.toFront()
|
|
|
|
setFocus = True
|
|
|
|
|
|
|
|
Exit_Function:
|
|
|
|
Utils._ResetCalledSub("Form.setFocus")
|
|
|
|
Exit Function
|
|
|
|
Error_Function:
|
|
|
|
TraceError(TRACEABORT, Err, "Form.setFocus", Erl)
|
|
|
|
Goto Exit_Function
|
|
|
|
End Function ' setFocus
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Public Function setProperty(ByVal Optional psProperty As String, ByVal Optional pvValue As Variant) As Boolean
|
|
|
|
' Return True if property setting OK
|
|
|
|
Utils._SetCalledSub("Form.setProperty")
|
|
|
|
setProperty = _PropertySet(psProperty, pvValue)
|
|
|
|
Utils._ResetCalledSub("Form.setProperty")
|
|
|
|
End Function
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
REM --- PRIVATE FUNCTIONS ---
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Public Sub _Initialize(psName As String)
|
|
|
|
' Set pointers to UNO objects
|
|
|
|
|
|
|
|
Dim oDatabase As Object, oFormsCollection As Object
|
|
|
|
If _ErrorHandler() Then On Local Error Goto Trace_Error
|
|
|
|
_Name = psName
|
|
|
|
_Shortcut = "Forms!" & Utils._Surround(psName)
|
|
|
|
Set oDatabase = Application._CurrentDb()
|
|
|
|
If IsLoaded Then
|
|
|
|
Select Case oDatabase._Standalone
|
|
|
|
Case False
|
|
|
|
If Not IsNull(Component.CurrentController) Then ' A form opened then closed afterwards keeps a Component attribute
|
|
|
|
Set ContainerWindow = Component.CurrentController.Frame.ContainerWindow
|
|
|
|
Set oFormsCollection = Component.getDrawPage.Forms
|
|
|
|
If oFormsCollection.hasByName("MainForm") Then
|
|
|
|
Set DatabaseForm = oFormsCollection.getByName("MainForm")
|
|
|
|
ElseIf oFormsCollection.hasByName("Form") Then
|
|
|
|
Set DatabaseForm = oFormsCollection.getByName("Form")
|
|
|
|
ElseIf oFormsCollection.hasByName(_Name) Then
|
|
|
|
Set DatabaseForm = oFormsCollection.getByName(_Name)
|
|
|
|
Else
|
|
|
|
Goto Trace_Internal_Error
|
|
|
|
End If
|
|
|
|
End If
|
|
|
|
Case True
|
|
|
|
Set ContainerWindow = oDatabase.Document.CurrentController.Frame.ContainerWindow
|
|
|
|
Set DatabaseForm = oDatabase.Form
|
|
|
|
End Select
|
|
|
|
Else
|
|
|
|
Set Component = Nothing
|
|
|
|
Set ContainerWindow = Nothing
|
|
|
|
Set DatabaseForm = Nothing
|
|
|
|
End If
|
|
|
|
|
|
|
|
Exit_Sub:
|
|
|
|
Exit Sub
|
|
|
|
Trace_Error:
|
|
|
|
TraceError(TRACEABORT, Err, "Form.Initialize", Erl)
|
|
|
|
Goto Exit_Sub
|
|
|
|
Trace_Internal_Error:
|
|
|
|
TraceError(TRACEABORT, ERRFORMNOTIDENTIFIED, Utils._CalledSub(), 0, , _Name)
|
|
|
|
Goto Exit_Sub
|
|
|
|
End Sub ' _Initialize
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Private Function _PropertiesList() As Variant
|
|
|
|
|
|
|
|
If IsLoaded Then
|
|
|
|
_PropertiesList = Array("AllowAdditions", "AllowDeletions", "AllowEdits", "Bookmark" _
|
|
|
|
, "Caption", "CurrentRecord", "Filter", "FilterOn", "Height", "IsLoaded" _
|
|
|
|
, "Name", "ObjectType", "OpenArgs" _
|
|
|
|
, "RecordSource", "Visible", "Width" _
|
|
|
|
) ' Recordset removed
|
|
|
|
Else
|
|
|
|
_PropertiesList = Array("IsLoaded", "Name" _
|
|
|
|
)
|
|
|
|
End If
|
|
|
|
|
|
|
|
End Function ' _PropertiesList
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Private Function _PropertyGet(ByVal psProperty As String) As Variant
|
|
|
|
' Return property value of the psProperty property name
|
|
|
|
|
|
|
|
If _ErrorHandler() Then On Local Error Goto Error_Function
|
|
|
|
Utils._SetCalledSub("Form.get" & psProperty)
|
|
|
|
|
|
|
|
'Execute
|
|
|
|
Dim oDatabase As Object, vBookmark As Variant, vEMPTY As Variant
|
|
|
|
Dim oObject As Object
|
|
|
|
_PropertyGet = vEMPTY
|
|
|
|
|
|
|
|
Select Case UCase(psProperty)
|
|
|
|
Case UCase("Name"), UCase("IsLoaded")
|
|
|
|
Case Else : If Not IsLoaded Then Goto Trace_Error_Form
|
|
|
|
End Select
|
|
|
|
Select Case UCase(psProperty)
|
|
|
|
Case UCase("AllowAdditions")
|
|
|
|
_PropertyGet = DatabaseForm.AllowInserts
|
|
|
|
Case UCase("AllowDeletions")
|
|
|
|
_PropertyGet = DatabaseForm.AllowDeletes
|
|
|
|
Case UCase("AllowEdits")
|
|
|
|
_PropertyGet = DatabaseForm.AllowUpdates
|
|
|
|
Case UCase("Bookmark")
|
|
|
|
On Local Error Resume Next ' Disable error handler because bookmarking does not always react well in events ...
|
|
|
|
If DatabaseForm.IsBookmarkable Then vBookmark = DatabaseForm.getBookmark() Else vBookmark = Nothing
|
2013-10-27 15:05:18 +01:00
|
|
|
If _ErrorHandler() Then On Local Error Goto Error_Function Else On Local Error Goto 0
|
2013-10-12 10:56:41 +02:00
|
|
|
If IsNull(vBookmark) Then Goto Trace_Error
|
|
|
|
_PropertyGet = vBookmark
|
|
|
|
Case UCase("Caption")
|
|
|
|
Set odatabase = Application._CurrentDb()
|
|
|
|
Select Case oDatabase._Standalone
|
|
|
|
Case True : _PropertyGet = oDatabase.Document.CurrentController.Frame.Title
|
|
|
|
Case False : _PropertyGet = Component.CurrentController.Frame.Title
|
|
|
|
End Select
|
|
|
|
Case UCase("CurrentRecord")
|
|
|
|
_PropertyGet = DatabaseForm.Row
|
|
|
|
Case UCase("Filter")
|
|
|
|
_PropertyGet = DatabaseForm.Filter
|
|
|
|
Case UCase("FilterOn")
|
|
|
|
_PropertyGet = DatabaseForm.ApplyFilter
|
|
|
|
Case UCase("Height")
|
|
|
|
_PropertyGet = ContainerWindow.getPosSize().Height
|
|
|
|
Case UCase("IsLoaded") ' Only for indirect access from property object
|
|
|
|
_PropertyGet = IsLoaded
|
|
|
|
Case UCase("Name")
|
|
|
|
_PropertyGet = _Name
|
|
|
|
Case UCase("ObjectType")
|
|
|
|
_PropertyGet = _Type
|
|
|
|
Case UCase("OpenArgs")
|
|
|
|
_PropertyGet = _OpenArgs
|
|
|
|
Case UCase("Recordset")
|
|
|
|
If DatabaseForm.Command = "" Then Goto Trace_Error ' No underlying data ??
|
|
|
|
Set oObject = New Recordset
|
|
|
|
With DatabaseForm
|
|
|
|
oObject._CommandType = DatabaseForm.CommandType
|
|
|
|
oObject._Command = DatabaseForm.Command
|
|
|
|
oObject._ParentName = _Name
|
|
|
|
oObject._ParentType = _Type
|
|
|
|
oObject._ForwardOnly = ( .ResultSetType = com.sun.star.sdbc.ResultSetType.FORWARD_ONLY )
|
|
|
|
oObject._PassThrough = ( .EscapeProcessing = False )
|
|
|
|
oObject._ReadOnly = ( .ResultSetConcurrency = com.sun.star.sdbc.ResultSetConcurrency.READ_ONLY )
|
|
|
|
Call oObject._Initialize()
|
|
|
|
End With
|
|
|
|
Set oDatabase = Application._CurrentDb()
|
|
|
|
With oDatabase
|
|
|
|
.RecordsetMax = .RecordsetMax + 1
|
|
|
|
oObject._Name = Format(.RecordsetMax, "0000000")
|
|
|
|
.RecordsetsColl.Add(oObject, UCase(oObject._Name))
|
|
|
|
End With
|
|
|
|
Set _PropertyGet = oObject
|
|
|
|
Case UCase("RecordSource")
|
|
|
|
_PropertyGet = DatabaseForm.ActiveCommand
|
|
|
|
Case UCase("Visible")
|
|
|
|
_PropertyGet = ContainerWindow.IsVisible()
|
|
|
|
Case UCase("Width")
|
|
|
|
_PropertyGet = ContainerWindow.getPosSize().Width
|
|
|
|
Case Else
|
|
|
|
Goto Trace_Error
|
|
|
|
End Select
|
|
|
|
|
|
|
|
Exit_Function:
|
|
|
|
Utils._ResetCalledSub("Form.get" & psProperty)
|
|
|
|
Exit Function
|
|
|
|
Trace_Error:
|
|
|
|
TraceError(TRACEWARNING, ERRPROPERTY, Utils._CalledSub(), 0, 1, psProperty)
|
|
|
|
_PropertyGet = vEMPTY
|
|
|
|
Goto Exit_Function
|
|
|
|
Trace_Error_Form:
|
|
|
|
TraceError(TRACEFATAL, ERRFORMNOTOPEN, Utils._CalledSub(), 0, 1, _Name)
|
|
|
|
_PropertyGet = vEMPTY
|
|
|
|
Goto Exit_Function
|
|
|
|
Error_Function:
|
|
|
|
TraceError(TRACEABORT, Err, "Form._PropertyGet", Erl)
|
|
|
|
_PropertyGet = vEMPTY
|
|
|
|
GoTo Exit_Function
|
|
|
|
End Function ' _PropertyGet
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
Private Function _PropertySet(ByVal psProperty As String, ByVal pvValue As Variant) As Boolean
|
|
|
|
|
|
|
|
Utils._SetCalledSub("Form.set" & psProperty)
|
|
|
|
If _ErrorHandler() Then On Local Error Goto Error_Function
|
|
|
|
_PropertySet = True
|
|
|
|
|
|
|
|
'Execute
|
|
|
|
Dim iArgNr As Integer
|
|
|
|
Dim oDatabase As Object
|
|
|
|
|
|
|
|
If Len(_A2B_.CalledSub) > 5 And Left(_A2B_.CalledSub, 5) = "Form." Then iArgNr = 1 Else iArgNr = 2
|
|
|
|
If Not IsLoaded Then Goto Trace_Error_Form
|
|
|
|
Select Case UCase(psProperty)
|
|
|
|
Case UCase("AllowAdditions")
|
|
|
|
If Not Utils._CheckArgument(pvValue, iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
|
|
|
|
DatabaseForm.AllowInserts = pvValue
|
|
|
|
DatabaseForm.reload()
|
|
|
|
Case UCase("AllowDeletions")
|
|
|
|
If Not Utils._CheckArgument(pvValue,iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
|
|
|
|
DatabaseForm.AllowDeletes = pvValue
|
|
|
|
DatabaseForm.reload()
|
|
|
|
Case UCase("AllowEdits")
|
|
|
|
If Not Utils._CheckArgument(pvValue, iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
|
|
|
|
DatabaseForm.AllowUpdates = pvValue
|
|
|
|
DatabaseForm.reload()
|
|
|
|
Case UCase("Bookmark")
|
|
|
|
If Not Utils._CheckArgument(pvValue, iArgNr, Utils._AddNumeric(vbObject), , False) Then Goto Trace_Error_Value
|
|
|
|
If IsNull(pvValue) Then Goto Trace_Error_Value
|
|
|
|
DatabaseForm.MoveToBookmark(pvValue)
|
|
|
|
Case UCase("Caption")
|
|
|
|
If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
|
|
|
|
Set oDatabase = Application._CurrentDb()
|
|
|
|
Select Case oDatabase._Standalone
|
|
|
|
Case True : oDatabase.Document.CurrentController.Frame.Title = pvValue
|
|
|
|
Case False : Component.CurrentController.Frame.Title = pvValue
|
|
|
|
End Select
|
|
|
|
Case UCase("CurrentRecord")
|
|
|
|
If Not Utils._CheckArgument(pvValue, iArgNr, Utils._AddNumeric(), , False) Then Goto Trace_Error_Value
|
|
|
|
If pvValue < 1 Then Goto Trace_Error_Value
|
|
|
|
DatabaseForm.absolute(pvValue)
|
|
|
|
Case UCase("Filter")
|
|
|
|
If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
|
|
|
|
DatabaseForm.Filter = Utils._ReplaceSquareBrackets(pvValue)
|
|
|
|
Case UCase("FilterOn")
|
|
|
|
If Not Utils._CheckArgument(pvValue, iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
|
|
|
|
DatabaseForm.ApplyFilter = pvValue
|
|
|
|
DatabaseForm.reload()
|
|
|
|
Case UCase("Height")
|
|
|
|
If Not Utils._CheckArgument(pvValue, iArgNr, Utils._AddNumeric(), , False) Then Goto Trace_Error_Value
|
2013-10-27 15:05:18 +01:00
|
|
|
If Utils._hasUNOProperty(ContainerWindow, "IsMaximized") Then ' Ignored when <= OO3.2
|
|
|
|
ContainerWindow.IsMaximized = False
|
|
|
|
ContainerWindow.IsMinimized = False
|
|
|
|
End If
|
2013-10-12 10:56:41 +02:00
|
|
|
ContainerWindow.setPosSize(0, 0, 0, pvValue, com.sun.star.awt.PosSize.HEIGHT)
|
|
|
|
Case UCase("RecordSource")
|
|
|
|
If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
|
|
|
|
DatabaseForm.Command = Utils._ReplaceSquareBrackets(pvValue)
|
|
|
|
DatabaseForm.CommandType = com.sun.star.sdb.CommandType.COMMAND
|
|
|
|
DatabaseForm.Filter = ""
|
|
|
|
DatabaseForm.reload()
|
|
|
|
Case UCase("Visible")
|
|
|
|
If Not Utils._CheckArgument(pvValue, iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
|
|
|
|
ContainerWindow.setVisible(pvValue)
|
|
|
|
Case UCase("Width")
|
|
|
|
If Not Utils._CheckArgument(pvValue, iArgNr, Utils._AddNumeric()) Then Goto Trace_Error_Value
|
2013-10-27 15:05:18 +01:00
|
|
|
If Utils._hasUNOProperty(ContainerWindow, "IsMaximized") Then ' Ignored when <= OO3.2
|
|
|
|
ContainerWindow.IsMaximized = False
|
|
|
|
ContainerWindow.IsMinimized = False
|
|
|
|
End If
|
2013-10-12 10:56:41 +02:00
|
|
|
ContainerWindow.setPosSize(0, 0, pvValue, 0, com.sun.star.awt.PosSize.WIDTH)
|
|
|
|
Case Else
|
|
|
|
Goto Trace_Error
|
|
|
|
End Select
|
|
|
|
|
|
|
|
Exit_Function:
|
|
|
|
Utils._ResetCalledSub("Form.set" & psProperty)
|
|
|
|
Exit Function
|
|
|
|
Trace_Error_Form:
|
|
|
|
TraceError(TRACEFATAL, ERRFORMNOTOPEN, Utils._CalledSub(), 0, 1, _Name)
|
|
|
|
_PropertySet = False
|
|
|
|
Goto Exit_Function
|
|
|
|
Trace_Error:
|
|
|
|
TraceError(TRACEFATAL, ERRPROPERTY, Utils._CalledSub(), 0, 1, psProperty)
|
|
|
|
_PropertySet = False
|
|
|
|
Goto Exit_Function
|
|
|
|
Trace_Error_Value:
|
|
|
|
TraceError(TRACEFATAL, ERRPROPERTYVALUE, Utils._CalledSub(), 0, 1, Array(pvValue, psProperty))
|
|
|
|
_PropertySet = False
|
|
|
|
Goto Exit_Function
|
|
|
|
Error_Function:
|
|
|
|
TraceError(TRACEABORT, Err, "Form._PropertySet", Erl)
|
|
|
|
_PropertySet = False
|
|
|
|
GoTo Exit_Function
|
|
|
|
End Function ' _PropertySet
|
|
|
|
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
REM --- CLASS PROPERTY SETs ---
|
|
|
|
REM --- Workaround to bug https://www.libreoffice.org/bugzilla/show_bug.cgi?id=60752 (LibreOffice 4.0) ---
|
|
|
|
REM -----------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
Property Set AllowAdditions(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("AllowAdditions", pvValue)
|
|
|
|
End Property ' AllowAdditions (set)
|
|
|
|
|
|
|
|
Property Set AllowDeletions(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("AllowDeletions", pvValue)
|
|
|
|
End Property ' AllowDeletions (set)
|
|
|
|
|
|
|
|
Property Set AllowEdits(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("AllowEdits", pvValue)
|
|
|
|
End Property ' AllowEdits (set)
|
|
|
|
|
|
|
|
Property Set Bookmark(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Bookmark", pvValue)
|
|
|
|
End Property ' Bookmark (set)
|
|
|
|
|
|
|
|
Property Set Caption(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Caption", pvValue)
|
|
|
|
End Property ' Caption (set)
|
|
|
|
|
|
|
|
Property Set CurrentRecord(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("CurrentRecord", pvValue)
|
|
|
|
End Property ' CurrentRecord (set)
|
|
|
|
|
|
|
|
Property Set Filter(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Filter", pvValue)
|
|
|
|
End Property ' Filter (set)
|
|
|
|
|
|
|
|
Property Set FilterOn(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("FilterOn", pvValue)
|
|
|
|
End Property ' FilterOn (set)
|
|
|
|
|
|
|
|
Property Set Height(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Height", pvValue)
|
|
|
|
End Property ' Height (set)
|
|
|
|
|
|
|
|
Property Set RecordSource(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("RecordSource", pvValue)
|
|
|
|
End Property ' RecordSource (set)
|
|
|
|
|
|
|
|
Property Set Visible(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Visible", pvValue)
|
|
|
|
End Property ' Visible (set)
|
|
|
|
|
|
|
|
Property Set Width(ByVal pvValue As Variant)
|
|
|
|
Call _PropertySet("Width", pvValue)
|
|
|
|
End Property ' Width (set)
|
|
|
|
|
|
|
|
</script:module>
|