bump product version to 5.0.4.1
[LibreOffice.git] / wizards / source / access2base / PropertiesSet.xba
blobcb480686842e2f00394d3aefe5fbcc9508172d53
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="PropertiesSet" script:language="StarBasic">REM =======================================================================================================================
4 REM === The Access2Base library is a part of the LibreOffice project. ===
5 REM === Full documentation is available on http://www.access2base.com ===
6 REM =======================================================================================================================
8 Option Explicit
10 REM -----------------------------------------------------------------------------------------------------------------------
11 Public Function setAbsolutePosition(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
12 &apos; Only for open forms
13 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setAbsolutePosition&quot;)
14 setAbsolutePosition = PropertiesSet._setProperty(pvObject, &quot;AbsolutePosition&quot;, pvValue)
15 End Function &apos; setAbsolutePosition
17 REM -----------------------------------------------------------------------------------------------------------------------
18 Public Function setAllowAdditions(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
19 &apos; Only for open forms
20 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setAllowAdditions&quot;)
21 setAllowAdditions = PropertiesSet._setProperty(pvObject, &quot;AllowAdditions&quot;, pvValue)
22 End Function &apos; setAllowAdditions
24 REM -----------------------------------------------------------------------------------------------------------------------
25 Public Function setAllowDeletions(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
26 &apos; Only for open forms
27 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setAllowDeletions&quot;)
28 setAllowDeletions = PropertiesSet._setProperty(pvObject, &quot;AllowDeletions&quot;, pvValue)
29 End Function &apos; setAllowDeletions
31 REM -----------------------------------------------------------------------------------------------------------------------
32 Public Function setAllowEdits(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
33 &apos; Only for open forms
34 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setAllowEdits&quot;)
35 setAllowEdits = PropertiesSet._setProperty(pvObject, &quot;AllowEdits&quot;, pvValue)
36 End Function &apos; setAllowEdits
38 REM -----------------------------------------------------------------------------------------------------------------------
39 Public Function setBackColor(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
40 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setBackColor&quot;)
41 setBackColor = PropertiesSet._setProperty(pvObject, &quot;BackColor&quot;, pvValue)
42 End Function &apos; setBackColor
44 REM -----------------------------------------------------------------------------------------------------------------------
45 Public Function setBookmark(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
46 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setBookmark&quot;)
47 setBookmark = PropertiesSet._setProperty(pvObject, &quot;Bookmark&quot;, pvValue)
48 End Function &apos; setBookmark
50 REM -----------------------------------------------------------------------------------------------------------------------
51 Public Function setBorderColor (Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
52 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setBorderColor&quot;)
53 setBorderColor = PropertiesSet._setProperty(pvObject, &quot;BorderColor&quot;, pvValue)
54 End Function &apos; setBorderColor
56 REM -----------------------------------------------------------------------------------------------------------------------
57 Public Function setBorderStyle(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
58 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setBorderStyle&quot;)
59 setBorderStyle = PropertiesSet._setProperty(pvObject, &quot;BorderStyle&quot;, pvValue)
60 End Function &apos; setBorderStyle
62 REM -----------------------------------------------------------------------------------------------------------------------
63 Public Function setCancel(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
64 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setCancel&quot;)
65 setCancel = PropertiesSet._setProperty(pvObject, &quot;Cancel&quot;, pvValue)
66 End Function &apos; setCancel
68 REM -----------------------------------------------------------------------------------------------------------------------
69 Public Function setCaption(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
70 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setCaption&quot;)
71 setCaption = PropertiesSet._setProperty(pvObject, &quot;Caption&quot;, pvValue)
72 End Function &apos; setCaption
74 REM -----------------------------------------------------------------------------------------------------------------------
75 Public Function setControlTipText(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
76 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setControlTipText&quot;)
77 setControlTipText = PropertiesSet._setProperty(pvObject, &quot;ControlTipText&quot;, pvValue)
78 End Function &apos; setControlTipText
80 REM -----------------------------------------------------------------------------------------------------------------------
81 Public Function setCurrentRecord(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
82 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setCurrentRecord&quot;)
83 setCurrentRecord = PropertiesSet._setProperty(pvObject, &quot;CurrentRecord&quot;, pvValue)
84 End Function &apos; setCurrentRecord
86 REM -----------------------------------------------------------------------------------------------------------------------
87 Public Function setDefault(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
88 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setDefault&quot;)
89 setDefault = PropertiesSet._setProperty(pvObject, &quot;Default&quot;, pvValue)
90 End Function &apos; setDefault
92 REM -----------------------------------------------------------------------------------------------------------------------
93 Public Function setDefaultValue(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
94 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setDefaultValue&quot;)
95 setDefaultValue = PropertiesSet._setProperty(pvObject, &quot;DefaultValue&quot;, pvValue)
96 End Function &apos; setDefaultValue
98 REM -----------------------------------------------------------------------------------------------------------------------
99 Public Function setDescription(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
100 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setDescription&quot;)
101 setDescription = PropertiesSet._setProperty(pvObject, &quot;Description&quot;, pvValue)
102 End Function &apos; setDescription
104 REM -----------------------------------------------------------------------------------------------------------------------
105 Public Function setEnabled(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
106 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setEnabled&quot;)
107 setEnabled = PropertiesSet._setProperty(pvObject, &quot;Enabled&quot;, pvValue)
108 End Function &apos; setEnabled
110 REM -----------------------------------------------------------------------------------------------------------------------
111 Public Function setFilter(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
112 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFilter&quot;)
113 setFilter = PropertiesSet._setProperty(pvObject, &quot;Filter&quot;, pvValue)
114 End Function &apos; setFilter
116 REM -----------------------------------------------------------------------------------------------------------------------
117 Public Function setFilterOn(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
118 &apos; Only for open forms
119 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFilterOn&quot;)
120 setFilterOn = PropertiesSet._setProperty(pvObject, &quot;FilterOn&quot;, pvValue)
121 End Function &apos; setFilterOn
123 REM -----------------------------------------------------------------------------------------------------------------------
124 Public Function setFontBold(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
125 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontBold&quot;)
126 setFontBold = PropertiesSet._setProperty(pvObject, &quot;FontBold&quot;, pvValue)
127 End Function &apos; setFontBold
129 REM -----------------------------------------------------------------------------------------------------------------------
130 Public Function setFontItalic(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
131 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontItalic&quot;)
132 setFontItalic = PropertiesSet._setProperty(pvObject, &quot;FontItalic&quot;, pvValue)
133 End Function &apos; setFontItalic
135 REM -----------------------------------------------------------------------------------------------------------------------
136 Public Function setFontName(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
137 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontName&quot;)
138 setFontName = PropertiesSet._setProperty(pvObject, &quot;FontName&quot;, pvValue)
139 End Function &apos; setFontName
141 REM -----------------------------------------------------------------------------------------------------------------------
142 Public Function setFontSize(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
143 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontSize&quot;)
144 setFontSize = PropertiesSet._setProperty(pvObject, &quot;FontSize&quot;, pvValue)
145 End Function &apos; setFontSize
147 REM -----------------------------------------------------------------------------------------------------------------------
148 Public Function setFontUnderline(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
149 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontUnderline&quot;)
150 setFontUnderline = PropertiesSet._setProperty(pvObject, &quot;FontUnderline&quot;, pvValue)
151 End Function &apos; setFontUnderline
153 REM -----------------------------------------------------------------------------------------------------------------------
154 Public Function setFontWeight(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
155 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontWeight&quot;)
156 setFontWeight = PropertiesSet._setProperty(pvObject, &quot;FontWeight&quot;, pvValue)
157 End Function &apos; setFontWeight
159 REM -----------------------------------------------------------------------------------------------------------------------
160 Public Function setForeColor(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
161 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setForeColor&quot;)
162 setForeColor = PropertiesSet._setProperty(pvObject, &quot;ForeColor&quot;, pvValue)
163 End Function &apos; setForeColor
165 REM -----------------------------------------------------------------------------------------------------------------------
166 Public Function setHeight(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
167 &apos; Only for open forms
168 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setHeight&quot;)
169 setHeight = PropertiesSet._setProperty(pvObject, &quot;Height&quot;, pvValue)
170 End Function &apos; setHeight
172 REM -----------------------------------------------------------------------------------------------------------------------
173 Public Function setListIndex(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
174 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setListIndex&quot;)
175 setListIndex = PropertiesSet._setProperty(pvObject, &quot;ListIndex&quot;, pvValue)
176 End Function &apos; setListIndex
178 REM -----------------------------------------------------------------------------------------------------------------------
179 Public Function setLocked(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
180 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setLocked&quot;)
181 setLocked = PropertiesSet._setProperty(pvObject, &quot;Locked&quot;, pvValue)
182 End Function &apos; setLocked
184 REM -----------------------------------------------------------------------------------------------------------------------
185 Public Function setMultiSelect(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
186 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setMultiSelect&quot;)
187 setMultiSelect = PropertiesSet._setProperty(pvObject, &quot;MultiSelect&quot;, pvValue)
188 End Function &apos; setMultiSelect
190 REM -----------------------------------------------------------------------------------------------------------------------
191 Public Function setOnAction(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
192 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setOnAction&quot;)
193 setOnAction = PropertiesSet._setProperty(pvObject, &quot;OnAction&quot;, pvValue)
194 End Function &apos; setOnAction
196 REM -----------------------------------------------------------------------------------------------------------------------
197 Public Function setOptionValue(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
198 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setOptionValue&quot;)
199 setOptionValue = PropertiesSet._setProperty(pvObject, &quot;OptionValue&quot;, pvValue)
200 End Function &apos; setOptionValue
202 REM -----------------------------------------------------------------------------------------------------------------------
203 Public Function setOrderBy(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
204 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setOrderBy&quot;)
205 setOrderBy = PropertiesSet._setProperty(pvObject, &quot;OrderBy&quot;, pvValue)
206 End Function &apos; setOrderBy
208 REM -----------------------------------------------------------------------------------------------------------------------
209 Public Function setOrderByOn(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
210 &apos; Only for open forms
211 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setOrderByOn&quot;)
212 setOrderByOn = PropertiesSet._setProperty(pvObject, &quot;OrderByOn&quot;, pvValue)
213 End Function &apos; setOrderByOn
215 REM -----------------------------------------------------------------------------------------------------------------------
216 Public Function setPage(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
217 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setPage&quot;)
218 setPage = PropertiesSet._setProperty(pvObject, &quot;Page&quot;, pvValue)
219 End Function &apos; setPage V0.9.1
221 REM -----------------------------------------------------------------------------------------------------------------------
222 Public Function setProperty(Optional pvItem As Variant, ByVal Optional psProperty As String, ByVal Optional pvValue As Variant, ByVal Optional pvIndex As Variant) As Variant
223 &apos; Return True if property setting OK
224 Utils._SetCalledSub(&quot;setProperty&quot;)
225 If IsMissing(pvItem) Or IsMissing(psProperty) Or IsMissing(pvValue) Or IsEmpty(pvItem) Then Call _TraceArguments()
226 If IsMissing(pvIndex) Then
227 setProperty = PropertiesSet._setProperty(pvItem, psProperty, pvValue)
228 Else
229 setProperty = PropertiesSet._setProperty(pvItem, psProperty, pvValue, pvIndex)
230 End If
231 Utils._ResetCalledSub(&quot;setProperty&quot;)
232 End Function
234 REM -----------------------------------------------------------------------------------------------------------------------
235 Public Function setRecordSource(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
236 &apos; Only for open forms
237 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setRecordSource&quot;)
238 setRecordSource = PropertiesSet._setProperty(pvObject, &quot;RecordSource&quot;, pvValue)
239 End Function &apos; setRecordSource
241 REM -----------------------------------------------------------------------------------------------------------------------
242 Public Function setRequired(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
243 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setRequired&quot;)
244 setRequired = PropertiesSet._setProperty(pvObject, &quot;Required&quot;, pvValue)
245 End Function &apos; setRequired
247 REM -----------------------------------------------------------------------------------------------------------------------
248 Public Function setRowSource(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
249 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setRowSource&quot;)
250 setRowSource = PropertiesSet._setProperty(pvObject, &quot;RowSource&quot;, pvValue)
251 End Function &apos; setRowSource
253 REM -----------------------------------------------------------------------------------------------------------------------
254 Public Function setRowSourceType(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
255 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setRowSourceType&quot;)
256 setRowSourceType = PropertiesSet._setProperty(pvObject, &quot;RowSourceType&quot;, pvValue)
257 End Function &apos; setRowSourceType
259 REM -----------------------------------------------------------------------------------------------------------------------
260 Public Function setSelected(Optional pvObject As Variant, ByVal Optional pvValue As Variant, ByVal Optional pvIndex As Variant) As Boolean
261 If IsMissing(pvObject) Or IsMissing(pvValue) Then Call _TraceArguments(&quot;setSelected&quot;)
262 If IsEmpty(pvObject) Then Call _TraceArguments(&quot;setSelected&quot;)
263 If IsMissing(pvIndex) Then
264 setSelected = PropertiesSet._setProperty(pvObject, &quot;Selected&quot;, pvValue)
265 Else
266 setSelected = PropertiesSet._setProperty(pvObject, &quot;Selected&quot;, pvValue, pvIndex)
267 End If
268 End Function &apos; setSelected
270 REM -----------------------------------------------------------------------------------------------------------------------
271 Public Function setSelLength(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
272 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setSelLength&quot;)
273 setSelLength = PropertiesSet._setProperty(pvObject, &quot;SelLength&quot;, pvValue)
274 End Function &apos; setSelLength
276 REM -----------------------------------------------------------------------------------------------------------------------
277 Public Function setSelStart(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
278 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setSelStart&quot;)
279 setSelStart = PropertiesSet._setProperty(pvObject, &quot;SelStart&quot;, pvValue)
280 End Function &apos; setSelStart
282 REM -----------------------------------------------------------------------------------------------------------------------
283 Public Function setSelText(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
284 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setSelText&quot;)
285 setSelText = PropertiesSet._setProperty(pvObject, &quot;SelText&quot;, pvValue)
286 End Function &apos; setSelText
288 REM -----------------------------------------------------------------------------------------------------------------------
289 Public Function setSpecialEffect(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
290 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setSpecialEffect&quot;)
291 setSpecialEffect = PropertiesSet._setProperty(pvObject, &quot;SpecialEffect&quot;, pvValue)
292 End Function &apos; setSpecialEffect
294 REM -----------------------------------------------------------------------------------------------------------------------
295 Public Function setTabIndex(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
296 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTabIndex&quot;)
297 setTabIndex = PropertiesSet._setProperty(pvObject, &quot;TabIndex&quot;, pvValue)
298 End Function &apos; setTabIndex
300 REM -----------------------------------------------------------------------------------------------------------------------
301 Public Function setTabStop(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
302 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTabStop&quot;)
303 setTabStop = PropertiesSet._setProperty(pvObject, &quot;TabStop&quot;, pvValue)
304 End Function &apos; setTabStop
306 REM -----------------------------------------------------------------------------------------------------------------------
307 Public Function setTag(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
308 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTag&quot;)
309 setTag = PropertiesSet._setProperty(pvObject, &quot;Tag&quot;, pvValue)
310 End Function &apos; setTag
312 REM -----------------------------------------------------------------------------------------------------------------------
313 Public Function setTextAlign(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
314 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTextAlign&quot;)
315 setTextAlign = PropertiesSet._setProperty(pvObject, &quot;TextAlign&quot;, pvValue)
316 End Function &apos; setTextAlign
318 REM -----------------------------------------------------------------------------------------------------------------------
319 Public Function setTooltipText(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
320 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTooltipText&quot;)
321 setTooltipText = PropertiesSet._setProperty(pvObject, &quot;TooltipText&quot;, pvValue)
322 End Function &apos; setTooltipText
324 REM -----------------------------------------------------------------------------------------------------------------------
325 Public Function setTripleState(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
326 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTripleState&quot;)
327 setTripleState = PropertiesSet._setProperty(pvObject, &quot;TripleState&quot;, pvValue)
328 End Function &apos; setTripleState
330 REM -----------------------------------------------------------------------------------------------------------------------
331 Public Function setValue(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
332 &apos; setValue also interprets shortcut strings !!
333 Dim vItem As Variant, sProperty As String
334 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setValue&quot;)
335 If VarType(pvObject) = vbString Then
336 Utils._SetCalledSub(&quot;setValue&quot;)
337 vItem = getObject(pvObject)
338 sProperty = Utils._FinalProperty(pvObject)
339 If sProperty = &quot;&quot; Then sProperty = &quot;Value&quot;
340 setValue = PropertiesSet._setProperty(vItem, sProperty, pvValue)
341 Utils._ResetCalledSub(&quot;setValue&quot;)
342 Else
343 setValue = PropertiesSet._setProperty(pvObject, &quot;Value&quot;, pvValue)
344 End If
345 End Function &apos; setValue
347 REM -----------------------------------------------------------------------------------------------------------------------
348 Public Function setVisible(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
349 &apos; Only for open forms and controls
350 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setVisible&quot;)
351 setVisible = PropertiesSet._setProperty(pvObject, &quot;Visible&quot;, pvValue)
352 End Function &apos; setVisible
354 REM -----------------------------------------------------------------------------------------------------------------------
355 Public Function setWidth(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
356 &apos; Only for open forms
357 If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setWidth&quot;)
358 setWidth = PropertiesSet._setProperty(pvObject, &quot;Width&quot;, pvValue)
359 End Function &apos; setWidth
361 REM -----------------------------------------------------------------------------------------------------------------------
362 REM --- PRIVATE FUNCTIONS ---
363 REM -----------------------------------------------------------------------------------------------------------------------
365 Private Function _CheckProperty(pvObject As Object, ByVal psProperty As String) As Boolean
366 &apos; Return False if psProperty not within the PropertyValues set of pvItem
368 Dim i As Integer, oPropertyValues As Variant, oProperty As Variant
369 oPropertyValues = pvObject.PropertyValues
371 For i = LBound(oPropertyValues) To UBound(oPropertyValues)
372 oProperty = oPropertyValues(i)
373 If UCase(oProperty.Name) = UCase(psProperty) Then
374 _CheckProperty = True
375 Exit Function
376 End If
377 Next i
379 _CheckProperty = False
380 Exit Function
382 End Function &apos; CheckProperty V0.7.5
384 REM -----------------------------------------------------------------------------------------------------------------------
385 Private Function _setProperty(pvItem As Variant, ByVal psProperty As String, ByVal pvValue As Variant, ByVal Optional pvIndex As Variant) As Boolean
386 &apos; Return True if property setting OK
387 Utils._SetCalledSub(&quot;set&quot; &amp; psProperty)
388 If _ErrorHandler() Then On Local Error Goto Error_Function
390 &apos;pvItem must be an object and have the requested property
391 If Not Utils._CheckArgument(pvItem, 1, vbObject) Then Goto Exit_Function
392 &apos;Check Index argument
393 If Not IsMissing(pvIndex) Then
394 If Not Utils._CheckArgument(pvIndex, 4, Utils._AddNumeric()) Then Goto Exit_Function
395 End If
396 &apos;Execute
397 Dim iArgNr As Integer, lFormat As Long
398 Dim i As Integer, iCount As Integer, iSelectedItems() As Integer, bListboxBound As Boolean
399 Dim odbDatabase As Object, vNames As Variant, bFound As Boolean, sName As String, oModel As Object
400 Dim ocButton As Variant, iRadioIndex As Integer
401 _setProperty = True
402 If _A2B_.CalledSub = &quot;setProperty&quot; Then iArgNr = 3 Else iArgNr = 2
403 If Not PropertiesGet._hasProperty(pvItem._Type, pvItem._PropertiesList(), psProperty) Then Goto Trace_Error_Control
404 Select Case UCase(psProperty)
405 Case UCase(&quot;AbsolutePosition&quot;)
406 If Not Utils._CheckArgument(pvItem, 1, OBJRECORDSET) Then Goto Exit_Function
407 pvItem.AbsolutePosition = pvValue
408 Case UCase(&quot;AllowAdditions&quot;)
409 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
410 pvItem.AllowAdditions = pvValue
411 Case UCase(&quot;AllowDeletions&quot;)
412 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
413 pvItem.AllowDeletions = pvValue
414 Case UCase(&quot;AllowEdits&quot;)
415 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
416 pvItem.AllowEdits = pvValue
417 Case UCase(&quot;BackColor&quot;)
418 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
419 pvItem.BackColor = pvValue
420 Case UCase(&quot;Bookmark&quot;)
421 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJRECORDSET)) Then Goto Exit_Function
422 pvItem.Bookmark = pvValue
423 Case UCase(&quot;BorderColor&quot;)
424 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
425 pvItem.BorderColor = pvValue
426 Case UCase(&quot;BorderStyle&quot;)
427 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
428 pvItem.BorderColor = pvValue
429 Case UCase(&quot;Cancel&quot;)
430 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
431 pvItem.Cancel = pvValue
432 Case UCase(&quot;Caption&quot;)
433 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG, OBJCONTROL)) Then Goto Exit_Function
434 pvItem.Caption = pvValue
435 Case UCase(&quot;ControlTipText&quot;)
436 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
437 pvItem.ControlTipText = pvValue
438 Case UCase(&quot;CurrentRecord&quot;)
439 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
440 pvItem.CurrentRecord = pvValue
441 Case UCase(&quot;Default&quot;)
442 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
443 pvItem.Default = pvValue
444 Case UCase(&quot;DefaultValue&quot;)
445 If Not Utils._CheckArgument(pvItem, 1, Array(OBJCONTROL, OBJFIELD)) Then Goto Exit_Function
446 pvItem.DefaultValue = pvValue
447 Case UCase(&quot;Description&quot;)
448 If Not Utils._CheckArgument(pvItem, 1, OBJFIELD) Then Goto Exit_Function
449 pvItem.DefaultValue = pvValue
450 Case UCase(&quot;Enabled&quot;)
451 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
452 pvItem.Enabled = pvValue
453 Case UCase(&quot;Filter&quot;)
454 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM, OBJRECORDSET)) Then Goto Exit_Function
455 pvItem.Filter = pvValue
456 Case UCase(&quot;FilterOn&quot;)
457 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
458 pvItem.FilterOn = pvValue
459 Case UCase(&quot;FontBold&quot;)
460 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
461 pvItem.FontBold = pvValue
462 Case UCase(&quot;FontItalic&quot;)
463 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
464 pvItem.FontItalic = pvValue
465 Case UCase(&quot;FontName&quot;)
466 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
467 pvItem.FontName = pvValue
468 Case UCase(&quot;FontSize&quot;)
469 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
470 pvItem.FontSize = pvValue
471 Case UCase(&quot;FontUnderline&quot;)
472 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
473 pvItem.FontUnderline = pvValue
474 Case UCase(&quot;FontWeight&quot;)
475 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
476 pvItem.FontWeight = pvValue
477 Case UCase(&quot;ForeColor&quot;)
478 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
479 pvItem.ForeColor = pvValue
480 Case UCase(&quot;Height&quot;)
481 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG)) Then Goto Exit_Function
482 pvItem.Height = pvValue
483 Case UCase(&quot;ListIndex&quot;)
484 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
485 pvItem.ListIndex = pvValue
486 Case UCase(&quot;Locked&quot;)
487 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
488 pvItem.Locked = pvValue
489 Case UCase(&quot;MultiSelect&quot;)
490 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
491 pvItem.MultiSelect = pvValue
492 Case UCase(&quot;OnAction&quot;)
493 If Not Utils._CheckArgument(pvItem, 1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
494 pvItem.OnAction = pvValue
495 Case UCase(&quot;OptionValue&quot;)
496 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
497 pvItem.OptionValue = pvValue
498 Case UCase(&quot;OrderBy&quot;)
499 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
500 pvItem.OrderBy = pvValue
501 Case UCase(&quot;OrderByOn&quot;)
502 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
503 pvItem.OrderByOn = pvValue
504 Case UCase(&quot;Page&quot;)
505 If Not Utils._CheckArgument(pvItem, 1, Array(OBJDIALOG, OBJCONTROL)) Then Goto Exit_Function
506 pvItem.Page = pvValue
507 Case UCase(&quot;RecordSource&quot;)
508 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
509 pvItem.RecordSource = pvValue
510 Case UCase(&quot;Required&quot;)
511 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
512 pvItem.Required = pvValue
513 Case UCase(&quot;RowSource&quot;)
514 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
515 pvItem.RowSource = pvValue
516 Case UCase(&quot;RowSourceType&quot;) &apos; Refresh done when RowSource changes, not RowSourceType
517 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
518 pvItem.RowSourceType = pvValue
519 Case UCase(&quot;Selected&quot;)
520 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
521 If IsMissing(pvIndex) Then pvItem.Selected = pvValue Else pvItem.SelectedI(pvValue, pvIndex)
522 Case UCase(&quot;SelLength&quot;)
523 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
524 pvItem.SelLength = pvValue
525 Case UCase(&quot;SelStart&quot;)
526 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
527 pvItem.SelStart = pvValue
528 Case UCase(&quot;SelText&quot;)
529 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
530 pvItem.SelText = pvValue
531 Case UCase(&quot;SpecialEffect&quot;)
532 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
533 pvItem.SpecialEffect = pvValue
534 Case UCase(&quot;TabIndex&quot;)
535 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
536 pvItem.TabIndex = pvValue
537 Case UCase(&quot;TabStop&quot;)
538 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
539 pvItem.TabStop = pvValue
540 Case UCase(&quot;Tag&quot;)
541 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
542 pvItem.Tag = pvValue
543 Case UCase(&quot;TextAlign&quot;)
544 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
545 pvItem.TextAlign = pvValue
546 Case UCase(&quot;TooltipText&quot;)
547 If Not Utils._CheckArgument(pvItem, 1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
548 pvItem.TooltipText = pvValue
549 Case UCase(&quot;TripleState&quot;)
550 If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
551 pvItem.TripleState = pvValue
552 Case UCase(&quot;Value&quot;)
553 If Not Utils._CheckArgument(pvItem, 1, Array(OBJCONTROL, OBJOPTIONGROUP, OBJFIELD, OBJTEMPVAR)) Then Goto Exit_Function
554 pvItem.Value = pvValue
555 Case UCase(&quot;Visible&quot;)
556 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG, OBJCONTROL, OBJCOMMANDBAR, OBJCOMMANDBARCONTROL)) Then Goto Exit_Function
557 pvItem.Visible = pvValue
558 Case UCase(&quot;Width&quot;)
559 If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG)) Then Goto Exit_Function
560 pvItem.Width = pvValue
561 Case Else
562 Goto Trace_Error_Control
563 End Select
565 Exit_Function:
566 Utils._ResetCalledSub(&quot;set&quot; &amp; psProperty)
567 Exit Function
568 Trace_Error_Form:
569 TraceError(TRACEFATAL, ERRFORMNOTFOUND, Utils._CalledSub(), 0, 1, pvItem._Name)
570 _setProperty = False
571 Goto Exit_Function
572 Trace_Error_Control:
573 TraceError(TRACEFATAL, ERRPROPERTY, Utils._CalledSub(), 0, 1, psProperty)
574 _setProperty = False
575 Goto Exit_Function
576 Trace_Error_Value:
577 TraceError(TRACEFATAL, ERRPROPERTYVALUE, Utils._CalledSub(), 0, 1, Array(pvValue, psProperty))
578 _setProperty = False
579 Goto Exit_Function
580 Trace_Error_Index:
581 TraceError(TRACEFATAL, ERRINDEXVALUE, Utils._CalledSub(), 0, 1, psProperty)
582 _setProperty = Nothing
583 Goto Exit_Function
584 Trace_Error_Array:
585 TraceError(TRACEFATAL, ERRPROPERTYNOTARRAY, Utils._CalledSub(), 0, 1, iArgNr)
586 _setProperty = Nothing
587 Goto Exit_Function
588 Error_Function:
589 TraceError(TRACEABORT, Err, &quot;_setProperty&quot;, Erl)
590 GoTo Exit_Function
591 End Function &apos; _setProperty V0.9.1
592 </script:module>