1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE script:module PUBLIC
"-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3 <script:module xmlns:
script=
"http://openoffice.org/2000/script" script:
name=
"Form" script:
language=
"StarBasic">
4 REM =======================================================================================================================
5 REM === The Access2Base library is a part of the LibreOffice project. ===
6 REM === Full documentation is available on http://www.access2base.com ===
7 REM =======================================================================================================================
14 REM -----------------------------------------------------------------------------------------------------------------------
15 REM --- CLASS ROOT FIELDS ---
16 REM -----------------------------------------------------------------------------------------------------------------------
18 Private _Type As String
' Must be FORM
19 Private _This As Object
' Workaround for absence of This builtin function
20 Private _Parent As Object
21 Private _Shortcut As String
22 Private _Name As String
23 Private _DocEntry As Integer
' Doc- and DbContainer entries in Root structure
24 Private _DbEntry As Integer
25 Private _MainForms As Variant
26 Private _PersistentName As String
27 Private _IsLoaded As Boolean
28 Private _OpenArgs As Variant
29 Private _OrderBy As String
30 Public Component As Object
' com.sun.star.text.TextDocument
31 Public ContainerWindow As Object
' (No name)
32 Public FormsCollection As Object
' com.sun.star.form.OFormsCollection
33 Public DatabaseForm As Object
' com.sun.star.form.component.DataForm and com.sun.star.sdb.ResultSet (a.o.)
35 REM -----------------------------------------------------------------------------------------------------------------------
36 REM --- CONSTRUCTORS / DESTRUCTORS ---
37 REM -----------------------------------------------------------------------------------------------------------------------
38 Private Sub Class_Initialize()
42 _Shortcut =
""
47 _PersistentName =
""
49 _OpenArgs =
""
50 _OrderBy =
""
51 Set Component = Nothing
52 Set ContainerWindow = Nothing
53 Set FormsCollection = Nothing
54 Set DatabaseForm = Nothing
55 End Sub
' Constructor
57 REM -----------------------------------------------------------------------------------------------------------------------
58 Private Sub Class_Terminate()
59 On Local Error Resume Next
60 Call Class_Initialize()
61 End Sub
' Destructor
63 REM -----------------------------------------------------------------------------------------------------------------------
66 If Not IsLoaded(True) Then
67 If Not IsNull(DatabaseForm) Then DatabaseForm.Dispose()
69 Call Class_Terminate()
70 End Sub
' Explicit destructor
72 REM -----------------------------------------------------------------------------------------------------------------------
73 REM --- CLASS GET/LET/SET PROPERTIES ---
74 REM -----------------------------------------------------------------------------------------------------------------------
75 Property Get AllowAdditions() As Variant
76 AllowAdditions = _PropertyGet(
"AllowAdditions
")
77 End Property
' AllowAdditions (get)
79 Property Let AllowAdditions(ByVal pvValue As Variant)
80 Call _PropertySet(
"AllowAdditions
", pvValue)
81 End Property
' AllowAdditions (set)
83 REM -----------------------------------------------------------------------------------------------------------------------
84 Property Get AllowDeletions() As Variant
85 AllowDeletions = _PropertyGet(
"AllowDeletions
")
86 End Property
' AllowDeletions (get)
88 Property Let AllowDeletions(ByVal pvValue As Variant)
89 Call _PropertySet(
"AllowDeletions
", pvValue)
90 End Property
' AllowDeletions (set)
92 REM -----------------------------------------------------------------------------------------------------------------------
93 Property Get AllowEdits() As Variant
94 AllowEdits = _PropertyGet(
"AllowEdits
")
95 End Property
' AllowEdits (get)
97 Property Let AllowEdits(ByVal pvValue As Variant)
98 Call _PropertySet(
"AllowEdits
", pvValue)
99 End Property
' AllowEdits (set)
101 REM -----------------------------------------------------------------------------------------------------------------------
102 Property Get Bookmark() As Variant
103 Bookmark = _PropertyGet(
"Bookmark
")
104 End Property
' Bookmark (get)
106 Property Let Bookmark(ByVal pvValue As Variant)
107 Call _PropertySet(
"Bookmark
", pvValue)
108 End Property
' Bookmark (set)
110 REM -----------------------------------------------------------------------------------------------------------------------
111 Property Get Caption() As Variant
112 Caption = _PropertyGet(
"Caption
")
113 End Property
' Caption (get)
115 Property Let Caption(ByVal pvValue As Variant)
116 Call _PropertySet(
"Caption
", pvValue)
117 End Property
' Caption (set)
119 REM -----------------------------------------------------------------------------------------------------------------------
120 Property Get CurrentRecord() As Variant
121 CurrentRecord = _PropertyGet(
"CurrentRecord
")
122 End Property
' CurrentRecord (get)
124 Property Let CurrentRecord(ByVal pvValue As Variant)
125 Call _PropertySet(
"CurrentRecord
", pvValue)
126 End Property
' CurrentRecord (set)
128 REM -----------------------------------------------------------------------------------------------------------------------
129 Property Get Filter() As Variant
130 Filter = _PropertyGet(
"Filter
")
131 End Property
' Filter (get)
133 Property Let Filter(ByVal pvValue As Variant)
134 Call _PropertySet(
"Filter
", pvValue)
135 End Property
' Filter (set)
137 REM -----------------------------------------------------------------------------------------------------------------------
138 Property Get FilterOn() As Variant
139 FilterOn = _PropertyGet(
"FilterOn
")
140 End Property
' FilterOn (get)
142 Property Let FilterOn(ByVal pvValue As Variant)
143 Call _PropertySet(
"FilterOn
", pvValue)
144 End Property
' FilterOn (set)
146 REM -----------------------------------------------------------------------------------------------------------------------
147 Property Get Height() As Variant
148 Height = _PropertyGet(
"Height
")
149 End Property
' Height (get)
151 Property Let Height(ByVal pvValue As Variant)
152 Call _PropertySet(
"Height
", pvValue)
153 End Property
' Height (set)
155 REM -----------------------------------------------------------------------------------------------------------------------
156 Function IsLoaded(ByVal Optional pbForce As Boolean) As Boolean
157 'Return True if form open
158 'pbForce = True forbids bypass on value of _IsLoaded
160 If _ErrorHandler() Then On Local Error Goto Error_Function
161 Utils._SetCalledSub(
"Form.getIsLoaded
")
162 If IsMissing(pbForce) Then pbForce = False
163 If ( Not pbForce ) And _IsLoaded Then
' For performance reasons, a form object, once detected as loaded, is presumed remaining loaded. Except if pbForce = True
169 Dim oDoc As Object, oDatabase As Object, oEnum As Object, oDesk As Object, oComp As Object, vPersistent As Variant
171 Set oDoc = _A2B_.CurrentDocument()
172 Select Case oDoc.DbConnect
174 Set oDesk = CreateUnoService(
"com.sun.star.frame.Desktop
")
175 Set oEnum = oDesk.Components().createEnumeration
176 Do While oEnum.hasMoreElements
' Search in all open components if one corresponds with current form
177 oComp = oEnum.nextElement
178 If _hasUNOProperty(oComp,
"Identifier
") Then
179 If oComp.Identifier =
"com.sun.star.sdb.FormDesign
" Then
180 vPersistent = Split(oComp.StringValue,
"/
")
181 If vPersistent(UBound(vPersistent) -
1) = _PersistentName Then
183 Set Component = oComp
190 Set Component = oDoc.Document
' Form
191 _IsLoaded = True
' Interactive form always loaded by design
197 Utils._ResetCalledSub(
"Form.getIsLoaded
")
200 TraceError(TRACEABORT, Err,
"Form.getIsLoaded
", Erl)
202 End Function
' IsLoaded V1.1
.0
204 REM -----------------------------------------------------------------------------------------------------------------------
205 Property Get Name() As String
206 Name = _PropertyGet(
"Name
")
207 End Property
' Name (get)
209 Public Function pName() As String
' For compatibility with
< V0.9
.0
210 pName = _PropertyGet(
"Name
")
211 End Function
' pName (get)
213 REM -----------------------------------------------------------------------------------------------------------------------
214 Property Get ObjectType() As String
215 ObjectType = _PropertyGet(
"ObjectType
")
216 End Property
' ObjectType (get)
218 REM -----------------------------------------------------------------------------------------------------------------------
219 Property Get OnApproveCursorMove() As Variant
220 OnApproveCursorMove = _PropertyGet(
"OnApproveCursorMove
")
221 End Property
' OnApproveCursorMove (get)
223 Property Let OnApproveCursorMove(ByVal pvValue As Variant)
224 Call _PropertySet(
"OnApproveCursorMove
", pvValue)
225 End Property
' OnApproveCursorMove (set)
227 REM -----------------------------------------------------------------------------------------------------------------------
228 Property Get OnApproveParameter() As Variant
229 OnApproveParameter = _PropertyGet(
"OnApproveParameter
")
230 End Property
' OnApproveParameter (get)
232 Property Let OnApproveParameter(ByVal pvValue As Variant)
233 Call _PropertySet(
"OnApproveParameter
", pvValue)
235 End Property
' OnApproveParameter (set)
237 REM -----------------------------------------------------------------------------------------------------------------------
238 Property Get OnApproveReset() As Variant
239 OnApproveReset = _PropertyGet(
"OnApproveReset
")
240 End Property
' OnApproveReset (get)
242 Property Let OnApproveReset(ByVal pvValue As Variant)
243 Call _PropertySet(
"OnApproveReset
", pvValue)
244 End Property
' OnApproveReset (set)
246 REM -----------------------------------------------------------------------------------------------------------------------
247 Property Get OnApproveRowChange() As Variant
248 OnApproveRowChange = _PropertyGet(
"OnApproveRowChange
")
249 End Property
' OnApproveRowChange (get)
251 Property Let OnApproveRowChange(ByVal pvValue As Variant)
252 Call _PropertySet(
"OnApproveRowChange
", pvValue)
253 End Property
' OnApproveRowChange (set)
255 REM -----------------------------------------------------------------------------------------------------------------------
256 Property Get OnApproveSubmit() As Variant
257 OnApproveSubmit = _PropertyGet(
"OnApproveSubmit
")
258 End Property
' OnApproveSubmit (get)
260 Property Let OnApproveSubmit(ByVal pvValue As Variant)
261 Call _PropertySet(
"OnApproveSubmit
", pvValue)
262 End Property
' OnApproveSubmit (set)
264 REM -----------------------------------------------------------------------------------------------------------------------
265 Property Get OnConfirmDelete() As Variant
266 OnConfirmDelete = _PropertyGet(
"OnConfirmDelete
")
267 End Property
' OnConfirmDelete (get)
269 Property Let OnConfirmDelete(ByVal pvValue As Variant)
270 Call _PropertySet(
"OnConfirmDelete
", pvValue)
271 End Property
' OnConfirmDelete (set)
273 REM -----------------------------------------------------------------------------------------------------------------------
274 Property Get OnCursorMoved() As Variant
275 OnCursorMoved = _PropertyGet(
"OnCursorMoved
")
276 End Property
' OnCursorMoved (get)
278 Property Let OnCursorMoved(ByVal pvValue As Variant)
279 Call _PropertySet(
"OnCursorMoved
", pvValue)
280 End Property
' OnCursorMoved (set)
282 REM -----------------------------------------------------------------------------------------------------------------------
283 Property Get OnErrorOccurred() As Variant
284 OnErrorOccurred = _PropertyGet(
"OnErrorOccurred
")
285 End Property
' OnErrorOccurred (get)
287 Property Let OnErrorOccurred(ByVal pvValue As Variant)
288 Call _PropertySet(
"OnErrorOccurred
", pvValue)
289 End Property
' OnErrorOccurred (set)
291 REM -----------------------------------------------------------------------------------------------------------------------
292 Property Get OnLoaded() As Variant
293 OnLoaded = _PropertyGet(
"OnLoaded
")
294 End Property
' OnLoaded (get)
296 Property Let OnLoaded(ByVal pvValue As Variant)
297 Call _PropertySet(
"OnLoaded
", pvValue)
298 End Property
' OnLoaded (set)
300 REM -----------------------------------------------------------------------------------------------------------------------
301 Property Get OnReloaded() As Variant
302 OnReloaded = _PropertyGet(
"OnReloaded
")
303 End Property
' OnReloaded (get)
305 Property Let OnReloaded(ByVal pvValue As Variant)
306 Call _PropertySet(
"OnReloaded
", pvValue)
307 End Property
' OnReloaded (set)
309 REM -----------------------------------------------------------------------------------------------------------------------
310 Property Get OnReloading() As Variant
311 OnReloading = _PropertyGet(
"OnReloading
")
312 End Property
' OnReloading (get)
314 Property Let OnReloading(ByVal pvValue As Variant)
315 Call _PropertySet(
"OnReloading
", pvValue)
316 End Property
' OnReloading (set)
318 REM -----------------------------------------------------------------------------------------------------------------------
319 Property Get OnResetted() As Variant
320 OnResetted = _PropertyGet(
"OnResetted
")
321 End Property
' OnResetted (get)
323 Property Let OnResetted(ByVal pvValue As Variant)
324 Call _PropertySet(
"OnResetted
", pvValue)
325 End Property
' OnResetted (set)
327 REM -----------------------------------------------------------------------------------------------------------------------
328 Property Get OnRowChanged() As Variant
329 OnRowChanged = _PropertyGet(
"OnRowChanged
")
330 End Property
' OnRowChanged (get)
332 Property Let OnRowChanged(ByVal pvValue As Variant)
333 Call _PropertySet(
"OnRowChanged
", pvValue)
334 End Property
' OnRowChanged (set)
336 REM -----------------------------------------------------------------------------------------------------------------------
337 Property Get OnUnloaded() As Variant
338 OnUnloaded = _PropertyGet(
"OnUnloaded
")
339 End Property
' OnUnloaded (get)
341 Property Let OnUnloaded(ByVal pvValue As Variant)
342 Call _PropertySet(
"OnUnloaded
", pvValue)
343 End Property
' OnUnloaded (set)
345 REM -----------------------------------------------------------------------------------------------------------------------
346 Property Get OnUnloading() As Variant
347 OnUnloading = _PropertyGet(
"OnUnloading
")
348 End Property
' OnUnloading (get)
350 Property Let OnUnloading(ByVal pvValue As Variant)
351 Call _PropertySet(
"OnUnloading
", pvValue)
352 End Property
' OnUnloading (set)
354 REM -----------------------------------------------------------------------------------------------------------------------
355 Property Get OpenArgs() As Variant
356 OpenArgs = _PropertyGet(
"OpenArgs
")
357 End Property
' OpenArgs (get)
359 REM -----------------------------------------------------------------------------------------------------------------------
360 Property Get OrderBy() As Variant
361 OrderBy = _PropertyGet(
"OrderBy
")
362 End Property
' OrderBy (get) V1.2
.0
364 Property Let OrderBy(ByVal pvValue As Variant)
365 Call _PropertySet(
"OrderBy
", pvValue)
366 End Property
' OrderBy (set)
368 REM -----------------------------------------------------------------------------------------------------------------------
369 Property Get OrderByOn() As Variant
370 OrderByOn = _PropertyGet(
"OrderByOn
")
371 End Property
' OrderByOn (get) V1.2
.0
373 Property Let OrderByOn(ByVal pvValue As Variant)
374 Call _PropertySet(
"OrderByOn
", pvValue)
375 End Property
' OrderByOn (set)
377 REM -----------------------------------------------------------------------------------------------------------------------
378 Public Function OptionGroup(ByVal Optional pvGroupName As Variant) As Variant
379 ' Return either an error or an object of type OPTIONGROUP based on its name
381 Const cstThisSub =
"Form.OptionGroup
"
382 Dim ogGroup As Object
383 Utils._SetCalledSub(cstThisSub)
384 If IsMissing(pvGroupName) Then Call _TraceArguments()
385 If _ErrorHandler() Then On Local Error Goto Error_Function
387 Set ogGroup = _OptionGroup(pvGroupName, CTLPARENTISFORM, Component, FormsCollection)
388 If Not IsNull(ogGroup) Then
389 ogGroup._DocEntry = _DocEntry
390 ogGroup._DbEntry = _DbEntry
392 Set OptionGroup = ogGroup
395 Utils._ResetCalledSub(cstThisSub)
398 TraceError(TRACEABORT, Err, Form.OptionGroup, Erl)
400 End Function
' OptionGroup V1.1
.0
402 REM -----------------------------------------------------------------------------------------------------------------------
403 Public Function Parent() As Object
405 End Function
' Parent (get) V6.4
.0
407 REM -----------------------------------------------------------------------------------------------------------------------
408 Public Function Properties(ByVal Optional pvIndex As Variant) As Variant
410 ' a Collection object if pvIndex absent
411 ' a Property object otherwise
413 Dim vProperty As Variant, vPropertiesList() As Variant, sObject As String
414 vPropertiesList = _PropertiesList()
415 sObject = Utils._PCase(_Type)
416 If IsMissing(pvIndex) Then
417 vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList)
419 vProperty = PropertiesGet._Properties(sObject, _This, vPropertiesList, pvIndex)
420 vProperty._Value = _PropertyGet(vPropertiesList(pvIndex))
424 Set Properties = vProperty
426 End Function
' Properties
428 REM -----------------------------------------------------------------------------------------------------------------------
429 Property Get Recordset() As Object
430 Recordset = _PropertyGet(
"Recordset
")
431 End Property
' Recordset (get) V0.9
.5
433 REM -----------------------------------------------------------------------------------------------------------------------
434 Property Get RecordSource() As Variant
435 RecordSource = _PropertyGet(
"RecordSource
")
436 End Property
' RecordSource (get)
438 Property Let RecordSource(ByVal pvValue As Variant)
439 Call _PropertySet(
"RecordSource
", pvValue)
440 End Property
' RecordSource (set)
442 REM -----------------------------------------------------------------------------------------------------------------------
443 Property Get Visible() As Variant
444 Visible = _PropertyGet(
"Visible
")
445 End Property
' Visible (get)
447 Property Let Visible(ByVal pvValue As Variant)
448 Call _PropertySet(
"Visible
", pvValue)
449 End Property
' Visible (set)
451 REM -----------------------------------------------------------------------------------------------------------------------
452 Property Get Width() As Variant
453 Width = _PropertyGet(
"Width
")
454 End Property
' Width (get)
456 Property Let Width(ByVal pvValue As Variant)
457 Call _PropertySet(
"Width
", pvValue)
458 End Property
' Width (set)
460 REM -----------------------------------------------------------------------------------------------------------------------
461 REM --- CLASS METHODS ---
462 REM -----------------------------------------------------------------------------------------------------------------------
464 Public Function mClose() As Variant
465 ' Close the form
467 If _ErrorHandler() Then On Local Error Goto Error_Function
468 Utils._SetCalledSub(
"Form.Close
")
470 Dim oDatabase As Object, oController As Object
471 Set oDatabase = Application._CurrentDb()
472 If oDatabase._DbConnect
<> DBCONNECTBASE Then Goto Error_NotApplicable
474 Set oController = oDatabase.Document.getFormDocuments.getByHierarchicalName(_Name)
480 Utils._ResetCalledSub(
"Form.Close
")
483 TraceError(TRACEFATAL, ERRMETHOD, Utils._CalledSub(),
0,
1, cstThisSub)
486 TraceError(TRACEABORT, Err,
"Form.Close
", Erl)
488 End Function
' Close
490 REM -----------------------------------------------------------------------------------------------------------------------
491 Public Function Controls(Optional ByVal pvIndex As Variant) As Variant
492 ' Return a Control object with name or index = pvIndex
494 If _ErrorHandler() Then On Local Error Goto Error_Function
495 Utils._SetCalledSub(
"Form.Controls
")
497 Dim ocControl As Variant, iControlCount As Integer
498 Dim oCounter As Variant, sControls() As Variant, i As Integer, bFound As Boolean, sIndex As String
499 Dim j As Integer, iCount As Integer, sName As String, iAddCount As Integer
500 Dim oDatabaseForm As Object, iCtlCount As Integer
502 Set ocControl = Nothing
503 If Not IsLoaded Then Goto Trace_Error_NotOpen
504 'Count number of controls thru the forms collection
506 iCount = FormsCollection.Count
507 For i =
0 To iCount -
1
508 If i =
0 Then Set oDatabaseForm = DatabaseForm Else Set oDatabaseForm = FormsCollection.getByIndex(i)
509 If Not IsNull(oDatabaseForm) Then iControlCount = iControlCount + oDatabaseForm.getCount()
512 If IsMissing(pvIndex) Then
' No argument, return Collection pseudo-object
513 Set oCounter = New Collect
514 Set oCounter._This = oCounter
515 oCounter._CollType = COLLCONTROLS
516 Set oCounter._Parent = _This
517 oCounter._Count = iControlCount
518 Set Controls = oCounter
522 If Not Utils._CheckArgument(pvIndex,
1, Utils._AddNumeric(vbString)) Then Goto Exit_Function
524 ' Start building the ocControl object
525 ' Determine exact name
528 Select Case VarType(pvIndex)
529 Case vbInteger, vbLong, vbSingle, vbDouble, vbCurrency, vbBigint, vbDecimal
530 If pvIndex
< 0 Or pvIndex
> iControlCount -
1 Then Goto Trace_Error_Index
532 For i =
0 To iCount -
1
533 If i =
0 Then Set oDatabaseForm = DatabaseForm Else Set oDatabaseForm = FormsCollection.getByIndex(i)
534 If Not IsNull(oDatabaseForm) Then
535 iCtlCount = oDatabaseForm.getCount()
536 If pvIndex
>= iAddCount And pvIndex
<= iAddcount + iCtlCount -
1 Then
537 sName = oDatabaseForm.ElementNames(pvIndex - iAddCount)
540 iAddCount = iAddcount +iCtlCount
543 Case vbString
' Check control name validity (non case sensitive)
544 sIndex = UCase(Utils._Trim(pvIndex))
546 For i =
0 To iCount -
1
547 If i =
0 Then Set oDatabaseForm = DatabaseForm Else Set oDatabaseForm = FormsCollection.getByIndex(i)
548 If Not IsNull(oDatabaseForm) Then
549 sControls() = oDatabaseForm.getElementNames()
550 For j =
0 To UBound(sControls)
551 If UCase(sControls(j)) = sIndex Then
557 If bFound Then Exit For
560 If Not bFound Then Goto Trace_NotFound
563 'Initialize a new Control object
564 Set ocControl = New Control
566 Set ._This = ocControl
568 ._ParentType = CTLPARENTISFORM
570 ._Shortcut = _Shortcut
& "!
" & Utils._Surround(sName)
571 If IsNull(oDatabaseForm) Then ._MainForm =
"" Else ._MainForm = oDatabaseForm.Name
572 Set .ControlModel = oDatabaseForm.getByName(sName)
573 ._ImplementationName = .ControlModel.getImplementationName()
574 ._FormComponent = Component
575 If Utils._hasUNOProperty(.ControlModel,
"ClassId
") Then ._ClassId = .ControlModel.ClassId
576 If ._ClassId
> 0 And ._ClassId
<> acHiddenControl Then
577 Set .ControlView = Component.CurrentController.getControl(.ControlModel)
581 ._DocEntry = _DocEntry
584 Set Controls = ocControl
587 Utils._ResetCalledSub(
"Form.Controls
")
590 TraceError(TRACEFATAL, ERRFORMNOTOPEN, Utils._CalledSub(),
0, , _Name)
591 Set Controls = Nothing
594 TraceError(TRACEFATAL, ERRCOLLECTION, Utils._CalledSub(),
0,
1)
595 Set Controls = Nothing
598 TraceError(TRACEFATAL, ERRCONTROLNOTFOUND, Utils._CalledSub(),
0, , Array(pvIndex, pvIndex))
599 Set Controls = Nothing
602 TraceError(TRACEABORT, Err,
"Form.Controls
", Erl)
603 Set Controls = Nothing
605 End Function
' Controls
607 REM -----------------------------------------------------------------------------------------------------------------------
608 Public Function CurrentDb() As Object
609 ' Returns Database object related to current form
611 Const cstThisSub =
"Form.CurrentDb
"
612 Utils._SetCalledSub(cstThisSub)
614 Set CurrentDb = Application._CurrentDb(_DocEntry, _DbEntry)
617 Utils._ResetCalledSub(cstThisSub)
619 End Function
' CurrentDb V1.1
.0
621 REM -----------------------------------------------------------------------------------------------------------------------
622 Public Function getProperty(Optional ByVal pvProperty As Variant) As Variant
623 ' Return property value of psProperty property name
625 Utils._SetCalledSub(
"Form.getProperty
")
626 If IsMissing(pvProperty) Then Call _TraceArguments()
627 getProperty = _PropertyGet(pvProperty)
628 Utils._ResetCalledSub(
"Form.getProperty
")
630 End Function
' getProperty
632 REM -----------------------------------------------------------------------------------------------------------------------
633 Public Function hasProperty(ByVal Optional pvProperty As Variant) As Boolean
634 ' Return True if object has a valid property called pvProperty (case-insensitive comparison !)
636 If IsMissing(pvProperty) Then hasProperty = PropertiesGet._hasProperty(_Type, _PropertiesList()) Else hasProperty = PropertiesGet._hasProperty(_Type, _PropertiesList(), pvProperty)
639 End Function
' hasProperty
641 REM -----------------------------------------------------------------------------------------------------------------------
642 Public Function Move( ByVal Optional pvLeft As Variant _
643 , ByVal Optional pvTop As Variant _
644 , ByVal Optional pvWidth As Variant _
645 , ByVal Optional pvHeight As Variant _
647 ' Execute Move method
648 Utils._SetCalledSub(
"Form.Move
")
649 If _ErrorHandler() Then On Local Error Goto Error_Function
651 Dim iArgNr As Integer
652 Select Case UCase(_A2B_.CalledSub)
653 Case UCase(
"Move
") : iArgNr =
1
654 Case UCase(
"Form.Move
") : iArgNr =
0
656 If IsMissing(pvLeft) Then pvLeft = -
1
657 If IsMissing(pvTop) Then pvTop = -
1
658 If IsMissing(pvWidth) Then pvWidth = -
1
659 If IsMissing(pvHeight) Then pvHeight = -
1
660 If Not Utils._CheckArgument(pvLeft, iArgNr +
1, Utils._AddNumeric()) Then Goto Exit_Function
661 If Not Utils._CheckArgument(pvTop, iArgNr +
2, Utils._AddNumeric()) Then Goto Exit_Function
662 If Not Utils._CheckArgument(pvWidth, iArgNr +
3, Utils._AddNumeric()) Then Goto Exit_Function
663 If Not Utils._CheckArgument(pvHeight, iArgNr +
4, Utils._AddNumeric()) Then Goto Exit_Function
665 Dim iArg As Integer, iWrong As Integer
' Check arguments values
667 If pvHeight
< -
1 Then
668 iArg =
4 : iWrong = pvHeight
669 ElseIf pvWidth
< -
1 Then
670 iArg =
3 : iWrong = pvWidth
671 ElseIf pvTop
< -
1 Then
672 iArg =
2 : iWrong = pvTop
673 ElseIf pvLeft
< -
1 Then
674 iArg =
1 : iWrong = pvLeft
677 TraceError(TRACEFATAL, ERRWRONGARGUMENT, Utils._CalledSub(),
0,
1, Array(iArgNr + iArg, iWrong))
681 Dim iPosSize As Integer
683 If pvLeft
>=
0 Then iPosSize = iPosSize + com.sun.star.awt.PosSize.X
684 If pvTop
>=
0 Then iPosSize = iPosSize + com.sun.star.awt.PosSize.Y
685 If pvWidth
> 0 Then iPosSize = iPosSize + com.sun.star.awt.PosSize.WIDTH
686 If pvHeight
> 0 Then iPosSize = iPosSize + com.sun.star.awt.PosSize.HEIGHT
687 If iPosSize
> 0 Then
688 If Utils._hasUNOProperty(ContainerWindow,
"IsMaximized
") Then
' Ignored when
<= OO3.2
689 ContainerWindow.IsMaximized = False
690 ContainerWindow.IsMinimized = False
692 ContainerWindow.setPosSize(pvLeft, pvTop, pvWidth, pvHeight, iPosSize)
697 Utils._ResetCalledSub(
"Form.Move
")
700 TraceError(TRACEABORT, Err,
"Form.Move
", Erl)
702 End Function
' Move
704 REM -----------------------------------------------------------------------------------------------------------------------
705 Public Function Refresh() As Boolean
706 ' Refresh data with its most recent value in the database in a form or subform
707 Utils._SetCalledSub(
"Form.Refresh
")
708 If _ErrorHandler() Then On Local Error Goto Error_Function
712 Set oSet = DatabaseForm.createResultSet()
713 If Not IsNull(oSet) Then
720 Utils._ResetCalledSub(
"Form.Refresh
")
723 TraceError(TRACEABORT, Err,
"SubForm.Refresh
", Erl)
725 End Function
' Refresh
727 REM -----------------------------------------------------------------------------------------------------------------------
728 Public Function Requery() As Boolean
729 ' Refresh data displayed in a form, subform, combobox or listbox
730 Utils._SetCalledSub(
"Form.Requery
")
731 If _ErrorHandler() Then On Local Error Goto Error_Function
734 DatabaseForm.reload()
738 Utils._ResetCalledSub(
"Form.Requery
")
741 TraceError(TRACEABORT, Err,
"Form.Requery
", Erl)
743 End Function
' Requery
745 REM -----------------------------------------------------------------------------------------------------------------------
746 Public Function setFocus() As Boolean
747 ' Execute setFocus method
748 Const cstThisSub =
"Form.setFocus
"
749 Utils._SetCalledSub(cstThisSub)
750 If _ErrorHandler() Then On Local Error Goto Error_Function
754 If .isVisible() = False Then .setVisible(True)
757 .setEnable(True)
' Added to try to bypass desynchro issue in Linux
758 .toFront()
' Added to force window change in Linux
763 Utils._ResetCalledSub(cstThisSub)
766 TraceError(TRACEABORT, Err, cstThisSub, Erl)
768 End Function
' setFocus V1.1
.0
770 REM -----------------------------------------------------------------------------------------------------------------------
771 Public Function setProperty(ByVal Optional psProperty As String, ByVal Optional pvValue As Variant) As Boolean
772 ' Return True if property setting OK
773 Utils._SetCalledSub(
"Form.setProperty
")
774 setProperty = _PropertySet(psProperty, pvValue)
775 Utils._ResetCalledSub(
"Form.setProperty
")
778 REM -----------------------------------------------------------------------------------------------------------------------
779 REM --- PRIVATE FUNCTIONS ---
780 REM -----------------------------------------------------------------------------------------------------------------------
782 REM -----------------------------------------------------------------------------------------------------------------------
783 Private Function _GetListener(ByVal psProperty As String) As String
784 ' Return the X...Listener corresponding with the property in argument
786 Select Case UCase(psProperty)
787 Case UCase(
"OnApproveCursorMove
")
788 _GetListener =
"XRowSetApproveListener
"
789 Case UCase(
"OnApproveParameter
")
790 _GetListener =
"XDatabaseParameterListener
"
791 Case UCase(
"OnApproveReset
"), UCase(
"OnResetted
")
792 _GetListener =
"XResetListener
"
793 Case UCase(
"OnApproveRowChange
")
794 _GetListener =
"XRowSetApproveListener
"
795 Case UCase(
"OnApproveSubmit
")
796 _GetListener =
"XSubmitListener
"
797 Case UCase(
"OnConfirmDelete
")
798 _GetListener =
"XConfirmDeleteListener
"
799 Case UCase(
"OnCursorMoved
"), UCase(
"OnRowChanged
")
800 _GetListener =
"XRowSetListener
"
801 Case UCase(
"OnErrorOccurred
")
802 _GetListener =
"XSQLErrorListener
"
803 Case UCase(
"OnLoaded
"), UCase(
"OnReloaded
"), UCase(
"OnReloading
"), UCase(
"OnUnloaded
"), UCase(
"OnUnloading
")
804 _GetListener =
"XLoadListener
"
807 End Function
' _GetListener V1.7
.0
809 REM -----------------------------------------------------------------------------------------------------------------------
810 Public Sub _Initialize(psName As String)
811 ' Set pointers to UNO objects
813 Dim oDoc As Object, oDatabase As Object
814 If _ErrorHandler() Then On Local Error Goto Trace_Error
816 _Shortcut =
"Forms!
" & Utils._Surround(psName)
817 Set oDoc = _A2B_.CurrentDocument()
818 If oDoc.DbConnect = DBCONNECTBASE Then _PersistentName = oDoc.Document.getFormDocuments().getByHierarchicalName(psName).PersistentName
820 Select Case oDoc.DbConnect
822 If Not IsNull(Component.CurrentController) Then
' A form opened then closed afterwards keeps a Component attribute
823 Set ContainerWindow = Component.CurrentController.Frame.ContainerWindow
824 Set FormsCollection = Component.getDrawPage.Forms
825 If FormsCollection.Count =
0 Then
826 Set DatabaseForm = Nothing
828 'Only first member of the collection can be reached with A2B
829 'Compliant with MSAccess which has
1 datasource by form, while LO might have many
830 _MainForms = FormsCollection.ElementNames()
831 Set DatabaseForm = FormsCollection.getByIndex(
0)
835 Set ContainerWindow = oDoc.Document.CurrentController.Frame.ContainerWindow
836 Set oDatabase = Application._CurrentDb(_DocEntry, _DbEntry)
838 Set DatabaseForm = .Form
839 If IsNull(.Connection) Then
840 Set .Connection = DatabaseForm.ActiveConnection
841 If Not IsNull(.Connection) Then
842 Set .MetaData = .Connection.MetaData
843 oDatabase._ReadOnly = .Connection.isReadOnly()
848 If IsNull(DatabaseForm) Then _OrderBy =
"" Else _OrderBy = DatabaseForm.Order
850 Set Component = Nothing
851 Set ContainerWindow = Nothing
852 Set DatabaseForm = Nothing
858 TraceError(TRACEABORT, Err,
"Form.Initialize
", Erl)
860 Trace_Internal_Error:
861 TraceError(TRACEABORT, ERRFORMNOTIDENTIFIED, Utils._CalledSub(),
0, , _Name)
863 End Sub
' _Initialize V1.1
.0
865 REM -----------------------------------------------------------------------------------------------------------------------
866 Private Function _PropertiesList() As Variant
869 _PropertiesList = Array(
"AllowAdditions
",
"AllowDeletions
",
"AllowEdits
",
"Bookmark
" _
870 ,
"Caption
",
"CurrentRecord
",
"Filter
",
"FilterOn
",
"Height
",
"IsLoaded
" _
871 ,
"Name
",
"ObjectType
",
"OnApproveCursorMove
",
"OnApproveParameter
" _
872 ,
"OnApproveReset
",
"OnApproveRowChange
",
"OnApproveSubmit
",
"OnConfirmDelete
" _
873 ,
"OnCursorMoved
",
"OnErrorOccurred
",
"OnLoaded
",
"OnReloaded
",
"OnReloading
" _
874 ,
"OnResetted
",
"OnRowChanged
",
"OnUnloaded
",
"OnUnloading
",
"OpenArgs
" _
875 ,
"OrderBy
",
"OrderByOn
",
"RecordSource
",
"Visible
",
"Width
" _
876 )
' Recordset removed
878 _PropertiesList = Array(
"IsLoaded
",
"Name
" _
882 End Function
' _PropertiesList
884 REM -----------------------------------------------------------------------------------------------------------------------
885 Private Function _PropertyGet(ByVal psProperty As String) As Variant
886 ' Return property value of the psProperty property name
888 If _ErrorHandler() Then On Local Error Goto Error_Function
889 Utils._SetCalledSub(
"Form.get
" & psProperty)
892 Dim oDatabase As Object, vBookmark As Variant
893 Dim i As Integer, oObject As Object
897 Select Case UCase(psProperty)
898 Case UCase(
"Name
"), UCase(
"IsLoaded
")
899 Case Else : If Not IsLoaded Then Goto Trace_Error_Form
902 Select Case UCase(psProperty)
903 Case UCase(
"AllowAdditions
")
904 If IsNull(DatabaseForm) Then _PropertyGet = False Else _PropertyGet = DatabaseForm.AllowInserts
905 Case UCase(
"AllowDeletions
")
906 If IsNull(DatabaseForm) Then _PropertyGet = False Else _PropertyGet = DatabaseForm.AllowDeletes
907 Case UCase(
"AllowEdits
")
908 If IsNull(DatabaseForm) Then _PropertyGet = False Else _PropertyGet = DatabaseForm.AllowUpdates
909 Case UCase(
"Bookmark
")
910 If IsNull(DatabaseForm) Then
913 On Local Error Resume Next
' Disable error handler because bookmarking does not always react well in events ...
914 If DatabaseForm.IsBookmarkable Then vBookmark = DatabaseForm.getBookmark() Else vBookmark = Nothing
915 If _ErrorHandler() Then On Local Error Goto Error_Function Else On Local Error Goto
0
916 If IsNull(vBookmark) Then Goto Trace_Error
917 _PropertyGet = vBookmark
919 Case UCase(
"Caption
")
920 Set odatabase = Application._CurrentDb(_DocEntry, _DbEntry)
921 Select Case oDatabase._DbConnect
922 Case DBCONNECTFORM : _PropertyGet = oDatabase.Document.CurrentController.Frame.Title
923 Case DBCONNECTBASE : _PropertyGet = Component.CurrentController.Frame.Title
925 Case UCase(
"CurrentRecord
")
926 If IsNull(DatabaseForm) Then _PropertyGet =
0 Else _PropertyGet = DatabaseForm.Row
927 Case UCase(
"Filter
")
928 If IsNull(DatabaseForm) Then _PropertyGet =
"" Else _PropertyGet = DatabaseForm.Filter
929 Case UCase(
"FilterOn
")
930 If IsNull(DatabaseForm) Then _PropertyGet = False Else _PropertyGet = DatabaseForm.ApplyFilter
931 Case UCase(
"Height
")
932 _PropertyGet = ContainerWindow.getPosSize().Height
933 Case UCase(
"IsLoaded
")
' Only for indirect access from property object
934 _PropertyGet = IsLoaded
935 Case UCase(
"Name
")
937 Case UCase(
"ObjectType
")
939 Case UCase(
"OnApproveCursorMove
"), UCase(
"OnApproveParameter
"), UCase(
"OnApproveReset
"), UCase(
"OnApproveRowChange
") _
940 , UCase(
"OnApproveSubmit
"), UCase(
"OnConfirmDelete
"), UCase(
"OnCursorMoved
"), UCase(
"OnErrorOccurred
") _
941 , UCase(
"OnLoaded
"), UCase(
"OnReloaded
"), UCase(
"OnReloading
"), UCase(
"OnResetted
"), UCase(
"OnRowChanged
") _
942 , UCase(
"OnUnloaded
"), UCase(
"OnUnloading
")
943 If IsNull(DatabaseForm) Then _PropertyGet =
"" Else _PropertyGet = Utils._GetEventScriptCode(DatabaseForm, psProperty, _Name, True)
944 Case UCase(
"OpenArgs
")
945 _PropertyGet = _OpenArgs
946 Case UCase(
"OrderBy
")
947 _PropertyGet = _OrderBy
948 Case UCase(
"OrderByOn
")
949 If IsNull(DatabaseForm) Then _PropertyGet = False Else _PropertyGet = ( DatabaseForm.Order
<> "" )
950 Case UCase(
"Recordset
")
951 If IsNull(DatabaseForm) Then Goto Trace_Error
952 If DatabaseForm.Command =
"" Then Goto Trace_Error
' No underlying data ??
953 Set oObject = New Recordset
955 oObject._This = oObject
956 oObject._CommandType = .CommandType
957 oObject._Command = .Command
958 oObject._ParentName = _Name
959 oObject._ParentType = _Type
960 Set oDatabase = Application._CurrentDb(_DocEntry, _DbEntry)
961 Set oObject._ParentDatabase = oDatabase
962 Set oObject._ParentDatabase.Connection = .ActiveConnection
963 oObject._ForwardOnly = ( .ResultSetType = com.sun.star.sdbc.ResultSetType.FORWARD_ONLY )
964 oObject._PassThrough = ( .EscapeProcessing = False )
965 oObject._ReadOnly = ( .ResultSetConcurrency = com.sun.star.sdbc.ResultSetConcurrency.READ_ONLY )
966 Call oObject._Initialize()
969 .RecordsetMax = .RecordsetMax +
1
970 oObject._Name = Format(.RecordsetMax,
"0000000")
971 .RecordsetsColl.Add(oObject, UCase(oObject._Name))
973 If Not ( oObject._BOF And oObject._EOF ) Then oObject.MoveFirst()
' Do nothing if resultset empty
974 Set _PropertyGet = oObject
975 Case UCase(
"RecordSource
")
976 If IsNull(DatabaseForm) Then _PropertyGet =
"" Else _PropertyGet = DatabaseForm.Command
977 Case UCase(
"Visible
")
978 _PropertyGet = ContainerWindow.IsVisible()
979 Case UCase(
"Width
")
980 _PropertyGet = ContainerWindow.getPosSize().Width
986 Utils._ResetCalledSub(
"Form.get
" & psProperty)
989 TraceError(TRACEWARNING, ERRPROPERTY, Utils._CalledSub(),
0,
1, psProperty)
993 TraceError(TRACEFATAL, ERRFORMNOTOPEN, Utils._CalledSub(),
0,
1, _Name)
997 TraceError(TRACEABORT, Err,
"Form._PropertyGet
", Erl)
1000 End Function
' _PropertyGet
1002 REM -----------------------------------------------------------------------------------------------------------------------
1003 Private Function _PropertySet(ByVal psProperty As String, ByVal pvValue As Variant) As Boolean
1005 Utils._SetCalledSub(
"Form.set
" & psProperty)
1006 If _ErrorHandler() Then On Local Error Goto Error_Function
1010 Dim iArgNr As Integer, i As Integer
1011 Dim oDatabase As Object
1013 If _Isleft(_A2B_.CalledSub,
"Form.
") Then iArgNr =
1 Else iArgNr =
2
1014 If Not IsLoaded Then Goto Trace_Error_Form
1016 Select Case UCase(psProperty)
1017 Case UCase(
"AllowAdditions
")
1018 If Not Utils._CheckArgument(pvValue, iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
1019 If IsNull(DatabaseForm) Then Goto Trace_Error
1020 DatabaseForm.AllowInserts = pvValue
1021 DatabaseForm.reload()
1022 Case UCase(
"AllowDeletions
")
1023 If Not Utils._CheckArgument(pvValue,iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
1024 If IsNull(DatabaseForm) Then Goto Trace_Error
1025 DatabaseForm.AllowDeletes = pvValue
1026 DatabaseForm.reload()
1027 Case UCase(
"AllowEdits
")
1028 If Not Utils._CheckArgument(pvValue, iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
1029 If IsNull(DatabaseForm) Then Goto Trace_Error
1030 DatabaseForm.AllowUpdates = pvValue
1031 DatabaseForm.reload()
1032 Case UCase(
"Bookmark
")
1033 If Not Utils._CheckArgument(pvValue, iArgNr, Utils._AddNumeric(vbObject), , False) Then Goto Trace_Error_Value
1034 If IsNull(pvValue) Then Goto Trace_Error_Value
1035 If IsNull(DatabaseForm) Then Goto Trace_Error
1036 DatabaseForm.MoveToBookmark(pvValue)
1037 Case UCase(
"Caption
")
1038 If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
1039 Set oDatabase = Application._CurrentDb(_DocEntry, _DbEntry)
1040 Select Case oDatabase._DbConnect
1041 Case DBCONNECTFORM : oDatabase.Document.CurrentController.Frame.Title = pvValue
1042 Case DBCONNECTBASE : Component.CurrentController.Frame.Title = pvValue
1044 Case UCase(
"CurrentRecord
")
1045 If Not Utils._CheckArgument(pvValue, iArgNr, Utils._AddNumeric(), , False) Then Goto Trace_Error_Value
1046 If pvValue
< 1 Then Goto Trace_Error_Value
1047 If IsNull(DatabaseForm) Then Goto Trace_Error
1048 DatabaseForm.absolute(pvValue)
1049 Case UCase(
"Filter
")
1050 If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
1051 If IsNull(DatabaseForm) Then Goto Trace_Error
1052 DatabaseForm.Filter = Application._CurrentDb(_DocEntry, _DbEntry)._ReplaceSquareBrackets(pvValue)
1053 Case UCase(
"FilterOn
")
1054 If Not Utils._CheckArgument(pvValue, iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
1055 If IsNull(DatabaseForm) Then Goto Trace_Error
1056 DatabaseForm.ApplyFilter = pvValue
1057 DatabaseForm.reload()
1058 Case UCase(
"Height
")
1059 If Not Utils._CheckArgument(pvValue, iArgNr, Utils._AddNumeric(), , False) Then Goto Trace_Error_Value
1060 If Utils._hasUNOProperty(ContainerWindow,
"IsMaximized
") Then
' Ignored when
<= OO3.2
1061 ContainerWindow.IsMaximized = False
1062 ContainerWindow.IsMinimized = False
1064 ContainerWindow.setPosSize(
0,
0,
0, pvValue, com.sun.star.awt.PosSize.HEIGHT)
1065 Case UCase(
"OnApproveCursorMove
"), UCase(
"OnApproveParameter
"), UCase(
"OnApproveReset
"), UCase(
"OnApproveRowChange
") _
1066 , UCase(
"OnApproveSubmit
"), UCase(
"OnConfirmDelete
"), UCase(
"OnCursorMoved
"), UCase(
"OnErrorOccurred
") _
1067 , UCase(
"OnLoaded
"), UCase(
"OnReloaded
"), UCase(
"OnReloading
"), UCase(
"OnResetted
"), UCase(
"OnRowChanged
") _
1068 , UCase(
"OnUnloaded
"), UCase(
"OnUnloading
")
1069 If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
1070 If IsNull(DatabaseForm) Then Goto Trace_Error
1071 If Not Utils._RegisterEventScript(DatabaseForm _
1073 , _GetListener(psProperty) _
1074 , pvValue, _Name, True _
1075 ) Then GoTo Trace_Error
1076 Case UCase(
"OrderBy
")
1077 If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
1078 If IsNull(DatabaseForm) Then Goto Trace_Error
1079 _OrderBy = Application._CurrentDb(_DocEntry, _DbEntry)._ReplaceSquareBrackets(pvValue)
1080 Case UCase(
"OrderByOn
")
1081 If Not Utils._CheckArgument(pvValue, iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
1082 If IsNull(DatabaseForm) Then Goto Trace_Error
1083 If pvValue Then DatabaseForm.Order = _OrderBy Else DatabaseForm.Order =
""
1084 DatabaseForm.reload()
1085 Case UCase(
"RecordSource
")
1086 If Not Utils._CheckArgument(pvValue, iArgNr, vbString, , False) Then Goto Trace_Error_Value
1087 If IsNull(DatabaseForm) Then Goto Trace_Error
1088 DatabaseForm.Command = Application._CurrentDb(_DocEntry, _DbEntry)._ReplaceSquareBrackets(pvValue)
1089 DatabaseForm.CommandType = com.sun.star.sdb.CommandType.COMMAND
1090 DatabaseForm.Filter =
""
1091 DatabaseForm.reload()
1092 Case UCase(
"Visible
")
1093 If Not Utils._CheckArgument(pvValue, iArgNr, vbBoolean, , False) Then Goto Trace_Error_Value
1094 ContainerWindow.setVisible(pvValue)
1095 Case UCase(
"Width
")
1096 If Not Utils._CheckArgument(pvValue, iArgNr, Utils._AddNumeric()) Then Goto Trace_Error_Value
1097 If Utils._hasUNOProperty(ContainerWindow,
"IsMaximized
") Then
' Ignored when
<= OO3.2
1098 ContainerWindow.IsMaximized = False
1099 ContainerWindow.IsMinimized = False
1101 ContainerWindow.setPosSize(
0,
0, pvValue,
0, com.sun.star.awt.PosSize.WIDTH)
1107 Utils._ResetCalledSub(
"Form.set
" & psProperty)
1110 TraceError(TRACEFATAL, ERRFORMNOTOPEN, Utils._CalledSub(),
0,
1, _Name)
1111 _PropertySet = False
1114 TraceError(TRACEFATAL, ERRPROPERTY, Utils._CalledSub(),
0,
1, psProperty)
1115 _PropertySet = False
1118 TraceError(TRACEFATAL, ERRPROPERTYVALUE, Utils._CalledSub(),
0,
1, Array(pvValue, psProperty))
1119 _PropertySet = False
1122 TraceError(TRACEABORT, Err,
"Form._PropertySet
", Erl)
1123 _PropertySet = False
1125 End Function
' _PropertySet