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=
"PropertiesGet" 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 =======================================================================================================================
10 REM -----------------------------------------------------------------------------------------------------------------------
11 Public Function getAbsolutePosition(Optional pvObject As Variant) As Boolean
12 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getAbsolutePosition
")
13 getAbsolutePosition = PropertiesGet._getProperty(pvObject,
"AbsolutePosition
")
14 End Function
' getAbsolutePosition
16 REM -----------------------------------------------------------------------------------------------------------------------
17 Public Function getAllowAdditions(Optional pvObject As Variant) As Boolean
18 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getAllowAdditions
")
19 getAllowAdditions = PropertiesGet._getProperty(pvObject,
"AllowAdditions
")
20 End Function
' getAllowAdditions
22 REM -----------------------------------------------------------------------------------------------------------------------
23 Public Function getAllowDeletions(Optional pvObject As Variant) As Boolean
24 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getAllowDeletions
")
25 getAllowDeletions = PropertiesGet._getProperty(pvObject,
"AllowDeletions
")
26 End Function
' getAllowDeletions
28 REM -----------------------------------------------------------------------------------------------------------------------
29 Public Function getAllowEdits(Optional pvObject As Variant) As Boolean
30 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getAllowEdits
")
31 getAllowEdits = PropertiesGet._getProperty(pvObject,
"AllowEdits
")
32 End Function
' getAllowEdits
34 REM -----------------------------------------------------------------------------------------------------------------------
35 Public Function getBackColor(Optional pvObject As Variant) As Variant
36 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBackColor
")
37 getBackColor = PropertiesGet._getProperty(pvObject,
"BackColor
")
38 End Function
' getBackColor
40 REM -----------------------------------------------------------------------------------------------------------------------
41 Public Function getBeginGroup(Optional pvObject As Variant) As Variant
42 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBeginGroup
")
43 getBeginGroup = PropertiesGet._getProperty(pvObject,
"BeginGroup
")
44 End Function
' getBeginGroup
46 REM -----------------------------------------------------------------------------------------------------------------------
47 Public Function getBOF(Optional pvObject As Variant) As Variant
48 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBOF
")
49 getBOF = PropertiesGet._getProperty(pvObject,
"BOF
")
50 End Function
' getBOF
52 REM -----------------------------------------------------------------------------------------------------------------------
53 Public Function getBookmark(Optional pvObject As Variant) As Variant
54 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBookmark
")
55 getBookmark = PropertiesGet._getProperty(pvObject,
"Bookmark
")
56 End Function
' getBookmark
58 REM -----------------------------------------------------------------------------------------------------------------------
59 Public Function getBookmarkable(Optional pvObject As Variant) As Variant
60 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBookmarkable
")
61 getBookmarkable = PropertiesGet._getProperty(pvObject,
"Bookmarkable
")
62 End Function
' getBookmarkable
64 REM -----------------------------------------------------------------------------------------------------------------------
65 Public Function getBorderColor(Optional pvObject As Variant) As Variant
66 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBorderColor
")
67 getBorderColor = PropertiesGet._getProperty(pvObject,
"BorderColor
")
68 End Function
' getBorderColor
70 REM -----------------------------------------------------------------------------------------------------------------------
71 Public Function getBorderStyle(Optional pvObject As Variant) As Variant
72 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBorderStyle
")
73 getBorderStyle = PropertiesGet._getProperty(pvObject,
"BorderStyle
")
74 End Function
' getBorderStyle
76 REM -----------------------------------------------------------------------------------------------------------------------
77 Public Function getBuiltIn(Optional pvObject As Variant) As Boolean
78 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBuiltIn
")
79 getBuiltIn = PropertiesGet._getProperty(pvObject,
"BuiltIn
")
80 End Function
' getBuiltIn
82 REM -----------------------------------------------------------------------------------------------------------------------
83 Public Function getButtonLeft(Optional pvObject As Variant) As Boolean
84 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getButtonLeft
")
85 getButtonLeft = PropertiesGet._getProperty(pvObject,
"ButtonLeft
")
86 End Function
' getButtonLeft
88 REM -----------------------------------------------------------------------------------------------------------------------
89 Public Function getButtonMiddle(Optional pvObject As Variant) As Boolean
90 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getButtonMiddle
")
91 getButtonMiddle = PropertiesGet._getProperty(pvObject,
"ButtonMiddle
")
92 End Function
' getButtonMiddle
94 REM -----------------------------------------------------------------------------------------------------------------------
95 Public Function getButtonRight(Optional pvObject As Variant) As Boolean
96 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getButtonRight
")
97 getButtonRight = PropertiesGet._getProperty(pvObject,
"ButtonRight
")
98 End Function
' getButtonRight
100 REM -----------------------------------------------------------------------------------------------------------------------
101 Public Function getCancel(Optional pvObject As Variant) As Variant
102 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getCancel
")
103 getCancel = PropertiesGet._getProperty(pvObject,
"Cancel
")
104 End Function
' getCancel
106 REM -----------------------------------------------------------------------------------------------------------------------
107 Public Function getCaption(Optional pvObject As Variant) As Variant
108 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getCaption
")
109 getCaption = PropertiesGet._getProperty(pvObject,
"Caption
")
110 End Function
' getCaption
112 REM -----------------------------------------------------------------------------------------------------------------------
113 Public Function getClickCount(Optional pvObject As Variant) As Long
114 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getClickCount
")
115 getClickCount = PropertiesGet._getProperty(pvObject,
"ClickCount
")
116 End Function
' getClickCount
118 REM -----------------------------------------------------------------------------------------------------------------------
119 Public Function getContextShortcut(Optional pvObject As Variant) As String
120 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getContextShortcut
")
121 getContextShortcut = PropertiesGet._getProperty(pvObject,
"ContextShortcut
")
122 End Function
' getContextShortcut
124 REM -----------------------------------------------------------------------------------------------------------------------
125 Public Function getControlSource(Optional pvObject As Variant) As Variant
126 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getControlSource
")
127 getControlSource = PropertiesGet._getProperty(pvObject,
"ControlSource
")
128 End Function
' getControlSource
130 REM -----------------------------------------------------------------------------------------------------------------------
131 Public Function getControlTipText(Optional pvObject As Variant) As Variant
132 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getControlTipText
")
133 getControlTipText = PropertiesGet._getProperty(pvObject,
"ControlTipText
")
134 End Function
' getControlTipText
136 REM -----------------------------------------------------------------------------------------------------------------------
137 Public Function getControlType(Optional pvObject As Variant) As Integer
138 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getControlType
")
139 getControlType = PropertiesGet._getProperty(pvObject,
"ControlType
")
140 End Function
' getControlType
142 REM -----------------------------------------------------------------------------------------------------------------------
143 Public Function getCount(Optional pvObject As Variant) As Integer
144 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getCount
")
145 getCount = PropertiesGet._getProperty(pvObject,
"Count
")
146 End Function
' getCount
148 REM -----------------------------------------------------------------------------------------------------------------------
149 Public Function getCurrentRecord(Optional pvObject As Variant) As Variant
150 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getCurrentRecord
")
151 getCurrentRecord = PropertiesGet._getProperty(pvObject,
"CurrentRecord
")
152 End Function
' getCurrentRecord
154 REM -----------------------------------------------------------------------------------------------------------------------
155 Public Function getDataType(Optional pvObject As Variant) As Variant
156 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getDataType
")
157 getDataType = PropertiesGet._getProperty(pvObject,
"DataType
")
158 End Function
' getDataType
160 REM -----------------------------------------------------------------------------------------------------------------------
161 Public Function getDbType(Optional pvObject As Variant) As Variant
162 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getDbType
")
163 getDbType = PropertiesGet._getProperty(pvObject,
"DbType
")
164 End Function
' getDbType
166 REM -----------------------------------------------------------------------------------------------------------------------
167 Public Function getDefault(Optional pvObject As Variant) As Variant
168 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getDefault
")
169 getDefault = PropertiesGet._getProperty(pvObject,
"Default
")
170 End Function
' getDefault
172 REM -----------------------------------------------------------------------------------------------------------------------
173 Public Function getDefaultValue(Optional pvObject As Variant) As Variant
174 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getDefaultValue
")
175 getDefaultValue = PropertiesGet._getProperty(pvObject,
"DefaultValue
")
176 End Function
' getDefaultValue
178 REM -----------------------------------------------------------------------------------------------------------------------
179 Public Function getDescription(Optional pvObject As Variant) As Variant
180 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getDescription
")
181 getDescription = PropertiesGet._getProperty(pvObject,
"Description
")
182 End Function
' getDescription
184 REM -----------------------------------------------------------------------------------------------------------------------
185 Public Function getEditMode(Optional pvObject As Variant) As Variant
186 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getEditMode
")
187 getEditMode = PropertiesGet._getProperty(pvObject,
"EditMode
")
188 End Function
' getEditMode
190 REM -----------------------------------------------------------------------------------------------------------------------
191 Public Function getEnabled(Optional pvObject As Variant) As Variant
192 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getEnabled
")
193 getEnabled = PropertiesGet._getProperty(pvObject,
"Enabled
")
194 End Function
' getEnabled
196 REM -----------------------------------------------------------------------------------------------------------------------
197 Public Function getEOF(Optional pvObject As Variant) As Variant
198 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getEOF
")
199 getEOF = PropertiesGet._getProperty(pvObject,
"EOF
")
200 End Function
' getEOF
202 REM -----------------------------------------------------------------------------------------------------------------------
203 Public Function getEventName(Optional pvObject As Variant) As String
204 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getEventName
")
205 getEventName = PropertiesGet._getProperty(pvObject,
"EventName
")
206 End Function
' getEventName
208 REM -----------------------------------------------------------------------------------------------------------------------
209 Public Function getEventType(Optional pvObject As Variant) As String
210 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getEventType
")
211 getEventType = PropertiesGet._getProperty(pvObject,
"EventType
")
212 End Function
' getEventType
214 REM -----------------------------------------------------------------------------------------------------------------------
215 Public Function getFieldSize(Optional pvObject As Variant) As Variant
216 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFieldSize
")
217 getFieldSize = PropertiesGet._getProperty(pvObject,
"FieldSize
")
218 End Function
' getFieldSize
220 REM -----------------------------------------------------------------------------------------------------------------------
221 Public Function getFilter(Optional pvObject As Variant) As String
222 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFilter
")
223 getFilter = PropertiesGet._getProperty(pvObject,
"Filter
")
224 End Function
' getFilter
226 REM -----------------------------------------------------------------------------------------------------------------------
227 Public Function getFilterOn(Optional pvObject As Variant) As Boolean
228 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFilterOn
")
229 getFilterOn = PropertiesGet._getProperty(pvObject,
"FilterOn
")
230 End Function
' getFilterOn
232 REM -----------------------------------------------------------------------------------------------------------------------
233 Public Function getFocusChangeTemporary(Optional pvObject As Variant) As Boolean
234 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFocusChangeTemporary
")
235 getFocusChangeTemporary = PropertiesGet._getProperty(pvObject,
"FocusChangeTemporary
")
236 End Function
' getFocusChangeTemporary
238 REM -----------------------------------------------------------------------------------------------------------------------
239 Public Function getFontBold(Optional pvObject As Variant) As Variant
240 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontBold
")
241 getFontBold = PropertiesGet._getProperty(pvObject,
"FontBold
")
242 End Function
' getFontBold
244 REM -----------------------------------------------------------------------------------------------------------------------
245 Public Function getFontItalic(Optional pvObject As Variant) As Variant
246 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontItalic
")
247 getFontItalic = PropertiesGet._getProperty(pvObject,
"FontItalic
")
248 End Function
' getFontItalic
250 REM -----------------------------------------------------------------------------------------------------------------------
251 Public Function getFontName(Optional pvObject As Variant) As Variant
252 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontName
")
253 getFontName = PropertiesGet._getProperty(pvObject,
"FontName
")
254 End Function
' getFontName
256 REM -----------------------------------------------------------------------------------------------------------------------
257 Public Function getFontSize(Optional pvObject As Variant) As Variant
258 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontSize
")
259 getFontSize = PropertiesGet._getProperty(pvObject,
"FontSize
")
260 End Function
' getFontSize
262 REM -----------------------------------------------------------------------------------------------------------------------
263 Public Function getFontUnderline(Optional pvObject As Variant) As Variant
264 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontUnderline
")
265 getFontUnderline = PropertiesGet._getProperty(pvObject,
"FontUnderline
")
266 End Function
' getFontUnderline
268 REM -----------------------------------------------------------------------------------------------------------------------
269 Public Function getFontWeight(Optional pvObject As Variant) As Variant
270 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontWeight
")
271 getFontWeight = PropertiesGet._getProperty(pvObject,
"FontWeight
")
272 End Function
' getFontWeight
274 REM -----------------------------------------------------------------------------------------------------------------------
275 Public Function getForm(Optional pvObject As Variant) As Variant
' Return Subform pseudo
276 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getForm
")
277 getForm = PropertiesGet._getProperty(pvObject,
"Form
")
278 End Function
' getForm
280 REM -----------------------------------------------------------------------------------------------------------------------
281 Public Function getFormat(Optional pvObject As Variant) As Variant
282 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFormat
")
283 getFormat = PropertiesGet._getProperty(pvObject,
"Format
")
284 End Function
' getFormat
286 REM -----------------------------------------------------------------------------------------------------------------------
287 Public Function getHeight(Optional pvObject As Variant) As Long
288 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getHeight
")
289 getHeight = PropertiesGet._getProperty(pvObject,
"Height
")
290 End Function
' getHeight
292 REM -----------------------------------------------------------------------------------------------------------------------
293 Public Function getForeColor(Optional pvObject As Variant) As Variant
294 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getForeColor
")
295 getForeColor = PropertiesGet._getProperty(pvObject,
"ForeColor
")
296 End Function
' getForeColor
298 REM -----------------------------------------------------------------------------------------------------------------------
299 Public Function getIsLoaded(Optional pvObject As Variant) As Boolean
300 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getIsLoaded
")
301 getIsLoaded = PropertiesGet._getProperty(pvObject,
"IsLoaded
")
302 End Function
' getIsLoaded
304 REM -----------------------------------------------------------------------------------------------------------------------
305 Public Function getItemData(Optional pvObject As Variant, ByVal Optional pvIndex As Variant) As Variant
306 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getItemData
")
307 If IsMissing(pvIndex) Then
308 getItemData = PropertiesGet._getProperty(pvObject,
"ItemData
")
310 getItemData = PropertiesGet._getProperty(pvObject,
"ItemData
", pvIndex)
312 End Function
' getItemData
314 REM -----------------------------------------------------------------------------------------------------------------------
315 Public Function getKeyAlt(Optional pvObject As Variant) As Boolean
316 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyAlt
")
317 getKeyAlt = PropertiesGet._getProperty(pvObject,
"KeyAlt
")
318 End Function
' getKeyAlt
320 REM -----------------------------------------------------------------------------------------------------------------------
321 Public Function getKeyChar(Optional pvObject As Variant) As String
322 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyChar
")
323 getKeyChar = PropertiesGet._getProperty(pvObject,
"KeyChar
")
324 End Function
' getKeyChar
326 REM -----------------------------------------------------------------------------------------------------------------------
327 Public Function getKeyCode(Optional pvObject As Variant) As Integer
328 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyCode
")
329 getKeyCode = PropertiesGet._getProperty(pvObject,
"KeyCode
")
330 End Function
' getKeyCode
332 REM -----------------------------------------------------------------------------------------------------------------------
333 Public Function getKeyCtrl(Optional pvObject As Variant) As Boolean
334 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyCtrl
")
335 getKeyCtrl = PropertiesGet._getProperty(pvObject,
"KeyCtrl
")
336 End Function
' getKeyCtrl
338 REM -----------------------------------------------------------------------------------------------------------------------
339 Public Function getKeyFunction(Optional pvObject As Variant) As Integer
340 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyFunction
")
341 getKeyFunction = PropertiesGet._getProperty(pvObject,
"KeyFunction
")
342 End Function
' getKeyFunction
344 REM -----------------------------------------------------------------------------------------------------------------------
345 Public Function getKeyShift(pvObject As Variant) As Boolean
346 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyShift
")
347 getKeyShift = PropertiesGet._getProperty(pvObject,
"KeyShift
")
348 End Function
' getKeyShift
350 REM -----------------------------------------------------------------------------------------------------------------------
351 Public Function getLinkChildFields(Optional pvObject As Variant, ByVal Optional pvIndex As Variant) As Variant
352 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getLinkChildFields
")
353 If IsMissing(pvObject) Then
354 getLinkChildFields = PropertiesGet._getProperty(pvObject,
"LinkChildFields
")
356 getLinkChildFields = PropertiesGet._getProperty(pvObject,
"LinkChildFields
", pvIndex)
358 End Function
' getLinkChildFields
360 REM -----------------------------------------------------------------------------------------------------------------------
361 Public Function getLinkMasterFields(Optional pvObject As Variant, ByVal Optional pvIndex As Variant) As Variant
362 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getLinkMasterFields
")
363 If IsMissing(pvIndex) Then
364 getLinkMasterFields = PropertiesGet._getProperty(pvObject,
"LinkMasterFields
")
366 getLinkMasterFields = PropertiesGet._getProperty(pvObject,
"LinkMasterFields
", pvIndex)
368 End Function
' getLinkMasterFields
370 REM -----------------------------------------------------------------------------------------------------------------------
371 Public Function getListCount(Optional pvObject As Variant) As Variant
372 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getListCount
")
373 getListCount = PropertiesGet._getProperty(pvObject,
"ListCount
")
374 End Function
' getListCount
376 REM -----------------------------------------------------------------------------------------------------------------------
377 Public Function getListIndex(Optional pvObject As Variant) As Variant
378 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getListIndex
")
379 getListIndex = PropertiesGet._getProperty(pvObject,
"ListIndex
")
380 End Function
' getListIndex
382 REM -----------------------------------------------------------------------------------------------------------------------
383 Public Function getLocked(Optional pvObject As Variant) As Variant
384 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getLocked
")
385 getLocked = PropertiesGet._getProperty(pvObject,
"Locked
")
386 End Function
' getLocked
388 REM -----------------------------------------------------------------------------------------------------------------------
389 Public Function getMultiSelect(Optional pvObject As Variant) As Variant
390 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getMultiSelect
")
391 getMultiSelect = PropertiesGet._getProperty(pvObject,
"MultiSelect
")
392 End Function
' getMultiSelect
394 REM -----------------------------------------------------------------------------------------------------------------------
395 Public Function getName(Optional pvObject As Variant) As String
396 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getName
")
397 getName = PropertiesGet._getProperty(pvObject,
"Name
")
398 End Function
' getName
400 REM -----------------------------------------------------------------------------------------------------------------------
401 Public Function getObject(Optional pvShortcut As Variant) As Variant
402 ' Return the object described by pvShortcut ignoring its final property
403 ' Example:
"Forms!myForm!myControl.myProperty
" =
> Controls(Forms(
"myForm
"),
"myControl
"))
405 Const cstEXCLAMATION =
"!
"
406 Const cstDOT =
".
"
408 If _ErrorHandler() Then On Local Error Goto Error_Function
409 Const cstThisSub =
"getObject
"
410 Utils._SetCalledSub(cstThisSub)
411 If IsMissing(pvShortcut) Then Call _TraceArguments()
412 If Not Utils._CheckArgument(pvShortcut,
1, vbString) Then Goto Exit_Function
414 Dim iCurrentIndex As Integer, vCurrentObject As Variant, sCurrentProperty As String
415 Dim sComponents() As String, sSubComponents() As String, sDialog As String
417 Set vCurrentObject = Nothing
418 sComponents = Split(Trim(pvShortcut), cstEXCLAMATION)
419 If UBound(sComponents) =
0 Then Goto Trace_Error
420 If Not Utils._InList(UCase(sComponents(
0)), Array(
"FORMS
",
"DIALOGS
",
"TEMPVARS
")) Then Goto Trace_Error
421 If sComponents(
1) =
"0" Or Left(sComponents(
1),
2) =
"0.
" Then
422 Set oDoc = _A2B_.CurrentDocument()
423 If oDoc.DbConnect = DBCONNECTFORM Then sComponents(
1) = oDoc.DbContainers(
0).FormName Else Goto Trace_Error
426 sSubComponents = Split(sComponents(UBound(sComponents)), cstDOT)
427 sComponents(UBound(sComponents)) = sSubComponents(
0)
' Ignore final property, if any
429 Set vCurrentObject = New Collect
430 Select Case UCase(sComponents(
0))
431 Case
"FORMS
" : vCurrentObject._CollType = COLLFORMS
432 Case
"DIALOGS
" : vCurrentObject._CollType = COLLALLDIALOGS
433 Case
"TEMPVARS
" : vCurrentObject._CollType = COLLTEMPVARS
435 For iCurrentIndex =
1 To UBound(sComponents)
' Start parsing ...
436 sSubComponents = Split(sComponents(iCurrentIndex), cstDOT)
437 sComponents(iCurrentIndex) = Utils._Trim(sSubComponents(
0))
438 Select Case UBound(sSubComponents)
440 sCurrentProperty =
""
442 sCurrentProperty = sSubComponents(
1)
446 Select Case vCurrentObject._Type
448 Select Case vCurrentObject._CollType
450 vCurrentObject = Application.Forms(sComponents(iCurrentIndex))
452 sDialog = UCase(sComponents(iCurrentIndex))
453 vCurrentObject = Application.AllDialogs(sDialog)
454 If Not vCurrentObject.IsLoaded Then Goto Trace_Error
455 Set vCurrentObject.UnoDialog = _A2B_.Dialogs.Item(sDialog)
457 If UBound(sComponents)
> 1 Then Goto Trace_Error
458 vCurrentObject = Application.TempVars(sComponents(
1))
461 Case OBJFORM, OBJSUBFORM, OBJCONTROL, OBJDIALOG
462 vCurrentObject = vCurrentObject.Controls(sComponents(iCurrentIndex))
464 If sCurrentProperty
<> "" Then vCurrentObject = vCurrentObject.getProperty(sCurrentProperty)
467 Set getObject = vCurrentObject
470 Utils._ResetCalledSub(cstThisSub)
473 TraceError(TRACEFATAL, ERRWRONGARGUMENT, Utils._CalledSub(),
0, , Array(
1, pvShortcut))
476 TraceError(TRACEABORT, Err, cstThisSub, Erl)
478 End Function
' getObject V0.9
.5
480 REM -----------------------------------------------------------------------------------------------------------------------
481 Public Function getObjectType(Optional pvObject As Variant) As String
482 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getObjectType
")
483 getObjectType = PropertiesGet._getProperty(pvObject,
"ObjectType
")
484 End Function
' getObjectType
486 REM -----------------------------------------------------------------------------------------------------------------------
487 Public Function getOpenArgs(Optional pvObject As Variant) As String
488 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getOpenArgs
")
489 getOpenArgs = PropertiesGet._getProperty(pvObject,
"OpenArgs
")
490 End Function
' getOpenArgs
492 REM -----------------------------------------------------------------------------------------------------------------------
493 Public Function getOptionGroup(Optional pvObject As Variant, pvName As variant) As Variant
494 ' Return an OptionGroup object based on its name
496 Utils._SetCalledSub(
"getOptionGroup
")
497 If IsMissing(pvObject) Or IsMissing(pvName) Then Call _TraceArguments()
498 If _ErrorHandler() Then On Local Error Goto Error_Function
500 If Not Utils._CheckArgument(pvObject,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
501 If Not Utils._CheckArgument(pvName,
2, vbString) Then Goto Exit_Function
503 getOptionGroup = pvObject.OptionGroup(pvName)
506 Utils._ResetCalledSub(
"getOptionGroup
")
509 TraceError(TRACEABORT, Err,
"getOptionGroup
", Erl)
511 End Function
' getOptionGroup V0.9
.0
513 REM -----------------------------------------------------------------------------------------------------------------------
514 Public Function getOptionValue(Optional pvObject As Variant) As String
515 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getOptionValue
")
516 getOptionValue = PropertiesGet._getProperty(pvObject,
"OptionValue
")
517 End Function
' getOptionValue
519 REM -----------------------------------------------------------------------------------------------------------------------
520 Public Function getOrderBy(Optional pvObject As Variant) As String
521 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getOrderBy
")
522 getOrderBy = PropertiesGet._getProperty(pvObject,
"OrderBy
")
523 End Function
' getOrderBy
525 REM -----------------------------------------------------------------------------------------------------------------------
526 Public Function getOrderByOn(Optional pvObject As Variant) As Boolean
527 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getOrderByOn
")
528 getOrderByOn = PropertiesGet._getProperty(pvObject,
"OrderByOn
")
529 End Function
' getOrderByOn
531 REM -----------------------------------------------------------------------------------------------------------------------
532 Public Function getPage(Optional pvObject As Variant) As String
533 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getPage
")
534 getPage = PropertiesGet._getProperty(pvObject,
"Page
")
535 End Function
' getPage V0.9
.1
537 REM -----------------------------------------------------------------------------------------------------------------------
538 Public Function getParent(Optional pvObject As Variant) As String
539 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getParent
")
540 getParent = PropertiesGet._getProperty(pvObject,
"Parent
")
541 End Function
' getParent V0.9
.0
543 REM -----------------------------------------------------------------------------------------------------------------------
544 Public Function getProperty(Optional pvItem As Variant, Optional ByVal pvProperty As Variant, ByVal Optional pvIndex As Variant) As Variant
545 ' Return property value of object pvItem, and psProperty property name
546 Utils._SetCalledSub(
"getProperty
")
547 If IsMissing(pvItem) Then Call _TraceArguments()
548 If IsMissing(pvProperty) Then Call _TraceArguments()
549 If IsMissing(pvIndex) Then getProperty = PropertiesGet._getProperty(pvItem, pvProperty) Else getProperty = PropertiesGet._getProperty(pvItem, pvProperty, pvIndex)
550 Utils._ResetCalledSub(
"getProperty
")
551 End Function
' getProperty
553 REM -----------------------------------------------------------------------------------------------------------------------
554 Public Function getRecommendation(Optional pvObject As Variant) As Variant
555 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRecommendation
")
556 getRecommendation = PropertiesGet._getProperty(pvObject,
"Recommendation
")
557 End Function
' getRecommendation
559 REM -----------------------------------------------------------------------------------------------------------------------
560 Public Function getRecordCount(Optional pvObject As Variant) As Variant
561 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRecordCount
")
562 getRecordCount = PropertiesGet._getProperty(pvObject,
"RecordCount
")
563 End Function
' getRecordCount
565 REM -----------------------------------------------------------------------------------------------------------------------
566 Public Function getRecordset(Optional pvObject As Variant) As String
567 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRecordset
")
568 getRecordset = PropertiesGet._getProperty(pvObject,
"Recordset
")
569 End Function
' getRecordset V0.9
.5
571 REM -----------------------------------------------------------------------------------------------------------------------
572 Public Function getRecordSource(Optional pvObject As Variant) As Variant
573 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRecordSource
")
574 getRecordSource = PropertiesGet._getProperty(pvObject,
"RecordSource
")
575 End Function
' getRecordSource
577 REM -----------------------------------------------------------------------------------------------------------------------
578 Public Function getRequired(Optional pvObject As Variant) As Variant
579 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRequired
")
580 getRequired = PropertiesGet._getProperty(pvObject,
"Required
")
581 End Function
' getRequired
583 REM -----------------------------------------------------------------------------------------------------------------------
584 Public Function getRowChangeAction(Optional pvObject As Variant) As Variant
585 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRowChangeAction
")
586 getRowChangeAction = PropertiesGet._getProperty(pvObject,
"RowChangeAction
")
587 End Function
' getRowChangeAction
589 REM -----------------------------------------------------------------------------------------------------------------------
590 Public Function getRowSource(Optional pvObject As Variant) As Variant
591 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRowSource
")
592 getRowSource = PropertiesGet._getProperty(pvObject,
"RowSource
")
593 End Function
' getRowSource
595 REM -----------------------------------------------------------------------------------------------------------------------
596 Public Function getRowSourceType(Optional pvObject As Variant) As Variant
597 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRowSourceType
")
598 getRowSourceType = PropertiesGet._getProperty(pvObject,
"RowSourceType
")
599 End Function
' getRowSourceType
601 REM -----------------------------------------------------------------------------------------------------------------------
602 Public Function getSelected(Optional pvObject As Variant, ByVal Optional pvIndex As Variant) As Variant
603 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSelected
")
604 If IsMissing(pvIndex) Then
605 getSelected = PropertiesGet._getProperty(pvObject,
"Selected
")
607 getSelected = PropertiesGet._getProperty(pvObject,
"Selected
", pvIndex)
609 End Function
' getSelected
611 REM -----------------------------------------------------------------------------------------------------------------------
612 Public Function getSize(Optional pvObject As Variant) As Variant
613 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSize
")
614 getSize = PropertiesGet._getProperty(pvObject,
"Size
")
615 End Function
' getSize
617 REM -----------------------------------------------------------------------------------------------------------------------
618 Public Function getSource(Optional pvObject As Variant) As String
619 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSource
")
620 getSource = PropertiesGet._getProperty(pvObject,
"Source
")
621 End Function
' getSource V0.9
.0
623 REM -----------------------------------------------------------------------------------------------------------------------
624 Public Function getSourceField(Optional pvObject As Variant) As Variant
625 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSourceField
")
626 getSourceField = PropertiesGet._getProperty(pvObject,
"SourceField
")
627 End Function
' getSourceField
629 REM -----------------------------------------------------------------------------------------------------------------------
630 Public Function getSourceTable(Optional pvObject As Variant) As Variant
631 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSourceTable
")
632 getSourceTable = PropertiesGet._getProperty(pvObject,
"SourceTable
")
633 End Function
' getSourceTable
635 REM -----------------------------------------------------------------------------------------------------------------------
636 Public Function getSpecialEffect(Optional pvObject As Variant) As Variant
637 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSpecialEffect
")
638 getSpecialEffect = PropertiesGet._getProperty(pvObject,
"SpecialEffect
")
639 End Function
' getSpecialEffect
641 REM -----------------------------------------------------------------------------------------------------------------------
642 Public Function getSubType(Optional pvObject As Variant) As Variant
643 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSubType
")
644 getSubType = PropertiesGet._getProperty(pvObject,
"SubType
")
645 End Function
' getSubType
647 REM -----------------------------------------------------------------------------------------------------------------------
648 Public Function getSubComponentName(Optional pvObject As Variant) As Variant
649 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSubComponentName
")
650 getSubComponentName = PropertiesGet._getProperty(pvObject,
"SubComponentName
")
651 End Function
' getSubComponentName
653 REM -----------------------------------------------------------------------------------------------------------------------
654 Public Function getSubComponentType(Optional pvObject As Variant) As Variant
655 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSubComponentType
")
656 getSubComponentType = PropertiesGet._getProperty(pvObject,
"SubComponentType
")
657 End Function
' getSubComponentType
659 REM -----------------------------------------------------------------------------------------------------------------------
660 Public Function getTabIndex(Optional pvObject As Variant) As Variant
661 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTabIndex
")
662 getTabIndex = PropertiesGet._getProperty(pvObject,
"TabIndex
")
663 End Function
' getTabIndex
665 REM -----------------------------------------------------------------------------------------------------------------------
666 Public Function getTabStop(Optional pvObject As Variant) As Variant
667 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTabStop
")
668 getTabStop = PropertiesGet._getProperty(pvObject,
"TabStop
")
669 End Function
' getTabStop
671 REM -----------------------------------------------------------------------------------------------------------------------
672 Public Function getTag(Optional pvObject As Variant) As Variant
673 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTag
")
674 getTag = PropertiesGet._getProperty(pvObject,
"Tag
")
675 End Function
' getTag
677 REM -----------------------------------------------------------------------------------------------------------------------
678 Public Function getText(Optional pvObject As Variant) As Variant
679 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getText
")
680 getText = PropertiesGet._getProperty(pvObject,
"Text
")
681 End Function
' getText
683 REM -----------------------------------------------------------------------------------------------------------------------
684 Public Function getTextAlign(Optional pvObject As Variant) As Variant
685 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTextAlign
")
686 getTextAlign = PropertiesGet._getProperty(pvObject,
"TextAlign
")
687 End Function
' getTextAlign
689 REM -----------------------------------------------------------------------------------------------------------------------
690 Public Function getTooltipText(Optional pvObject As Variant) As Variant
691 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTooltipText
")
692 getTooltipText = PropertiesGet._getProperty(pvObject,
"TooltipText
")
693 End Function
' getTooltipText
695 REM -----------------------------------------------------------------------------------------------------------------------
696 Public Function getTripleState(Optional pvObject As Variant) As Variant
697 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTripleState
")
698 getTripleState = PropertiesGet._getProperty(pvObject,
"TripleState
")
699 End Function
' getTripleState
701 REM -----------------------------------------------------------------------------------------------------------------------
702 Public Function getTypeName(Optional pvObject As Variant) As Variant
703 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTypeName
")
704 getTypeName = PropertiesGet._getProperty(pvObject,
"TypeName
")
705 End Function
' getTypeName
707 REM -----------------------------------------------------------------------------------------------------------------------
708 Public Function getValue(Optional pvObject As Variant) As Variant
709 ' getValue also interprets shortcut strings !!
710 Dim vItem As Variant, sProperty As String
711 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getValue
")
712 If VarType(pvObject) = vbString Then
713 Utils._SetCalledSub(
"getValue
")
714 Set vItem = getObject(pvObject)
715 sProperty = Utils._FinalProperty(pvObject)
716 If sProperty =
"" Then sProperty =
"Value
" ' Default value if final property in shortcut is absent
717 getValue = vItem.getProperty(sproperty)
718 Utils._ResetCalledSub(
"getValue
")
721 getValue = vItem.getProperty(
"Value
")
723 End Function
' getValue
725 REM -----------------------------------------------------------------------------------------------------------------------
726 Public Function getVisible(Optional pvObject As Variant) As Variant
727 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getVisible
")
728 getVisible = PropertiesGet._getProperty(pvObject,
"Visible
")
729 End Function
' getVisible
731 REM -----------------------------------------------------------------------------------------------------------------------
732 Public Function getWidth(Optional pvObject As Variant) As Long
733 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getWdth
")
734 getWidth = PropertiesGet._getProperty(pvObject,
"Width
")
735 End Function
' getWidth
737 REM -----------------------------------------------------------------------------------------------------------------------
738 Public Function getXPos(Optional pvObject As Variant) As Long
739 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getXPos
")
740 getXPos = PropertiesGet._getProperty(pvObject,
"XPos
")
741 End Function
' getXPos
743 REM -----------------------------------------------------------------------------------------------------------------------
744 Public Function getYPos(Optional pvObject As Variant) As Long
745 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getYPos
")
746 getYPos = PropertiesGet._getProperty(pvObject,
"YPos
")
747 End Function
' getYPos
749 REM -----------------------------------------------------------------------------------------------------------------------
750 REM --- PRIVATE FUNCTIONS ---
751 REM -----------------------------------------------------------------------------------------------------------------------
753 Public Function _getProperty(pvItem As Variant, ByVal psProperty As String, ByVal Optional pvIndex As Variant) As Variant
754 ' Return property value of the psProperty property name within object pvItem
756 If _ErrorHandler() Then On Local Error Goto Error_Function
757 Utils._SetCalledSub(
"get
" & psProperty)
758 _getProperty = Nothing
760 'pvItem must be an object and have the requested property
761 If Not Utils._CheckArgument(pvItem,
1, vbObject) Then Goto Exit_Function
762 If Not PropertiesGet._hasProperty(pvItem._Type, pvItem._PropertiesList(), psProperty) Then Goto Trace_Error
763 'Check Index argument
764 If Not IsMissing(pvIndex) Then
765 If Not Utils._CheckArgument(pvIndex,
3, Utils._AddNumeric()) Then Goto Exit_Function
768 Select Case UCase(psProperty)
769 Case UCase(
"AbsolutePosition
")
770 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
771 _getProperty = pvItem.AbsolutePosition
772 Case UCase(
"AllowAdditions
")
773 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
774 _getProperty = pvItem.AllowAdditions
775 Case UCase(
"AllowDeletions
")
776 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
777 _getProperty = pvItem.AllowDeletions
778 Case UCase(
"AllowEdits
")
779 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
780 _getProperty = pvItem.AllowEdits
781 Case UCase(
"BackColor
")
782 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
783 _getProperty = pvItem.BackColor
784 Case UCase(
"BeginGroup
")
785 If Not Utils._CheckArgument(pvItem,
1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
786 _getProperty = pvItem.BeginGroup
787 Case UCase(
"BOF
")
788 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
789 _getProperty = pvItem.BOF
790 Case UCase(
"Bookmark
")
791 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJRECORDSET)) Then Goto Exit_Function
792 _getProperty = pvItem.Bookmark
793 Case UCase(
"Bookmarkable
")
794 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
795 _getProperty = pvItem.Bookmarkable
796 Case UCase(
"BorderColor
")
797 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
798 _getProperty = pvItem.BorderColor
799 Case UCase(
"BorderStyle
")
800 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
801 _getProperty = pvItem.BorderStyle
802 Case UCase(
"BuiltIn
")
803 If Not Utils._CheckArgument(pvItem,
1, Array(OBJCOMMANDBAR, OBJCOMMANDBARCONTROL)) Then Goto Exit_Function
804 _getProperty = pvItem.BuiltIn
805 Case UCase(
"ButtonLeft
")
806 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
807 _getProperty = pvItem.ButtonLeft
808 Case UCase(
"ButtonMiddle
")
809 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
810 _getProperty = pvItem.ButtonMiddle
811 Case UCase(
"ButtonRight
")
812 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
813 _getProperty = pvItem.ButtonRight
814 Case UCase(
"Cancel
")
815 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
816 _getProperty = pvItem.Cancel
817 Case UCase(
"Caption
")
818 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJDIALOG, OBJCONTROL, OBJCOMMANDBARCONTROL)) Then Goto Exit_Function
819 _getProperty = pvItem.Caption
820 Case UCase(
"ClickCount
")
821 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
822 _getProperty = pvItem.ClickCount
823 Case UCase(
"ContextShortcut
")
824 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
825 _getProperty = pvItem.ContextShortcut
826 Case UCase(
"ControlSource
")
827 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
828 _getProperty = pvItem.ControlSource
829 Case UCase(
"ControlTipText
")
830 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
831 _getProperty = pvItem.ControlTipText
832 Case UCase(
"ControlType
")
833 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
834 _getProperty = pvItem.ControlType
835 Case UCase(
"Count
")
836 If Not Utils._CheckArgument(pvItem,
1, Array(OBJCOLLECTION,OBJOPTIONGROUP)) Then Goto Exit_Function
837 _getProperty = pvItem.Count
838 Case UCase(
"CurrentRecord
")
839 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
840 _getProperty = pvItem.CurrentRecord
841 Case UCase(
"DataType
")
842 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
843 _getProperty = pvItem.DataType
844 Case UCase(
"DbType
")
845 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
846 _getProperty = pvItem.DbType
847 Case UCase(
"Default
")
848 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
849 _getProperty = pvItem.Default
850 Case UCase(
"DefaultValue
")
851 If Not Utils._CheckArgument(pvItem,
1, Array(OBJCONTROL, OBJFIELD)) Then Goto Exit_Function
852 _getProperty = pvItem.DefaultValue
853 Case UCase(
"Description
")
854 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
855 _getProperty = pvItem.Description
856 Case UCase(
"EditMode
")
857 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
858 _getProperty = pvItem.EditMode
859 Case UCase(
"Enabled
")
860 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
861 _getProperty = pvItem.Enabled
862 Case UCase(
"EOF
")
863 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
864 _getProperty = pvItem.EOF
865 Case UCase(
"EventName
")
866 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
867 _getProperty = pvItem.EventName
868 Case UCase(
"EventType
")
869 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
870 _getProperty = pvItem.EventType
871 Case UCase(
"FieldSize
")
872 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
873 _getProperty = pvItem.FieldSize
874 Case UCase(
"Filter
")
875 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM, OBJRECORDSET)) Then Goto Exit_Function
876 _getProperty = pvItem.Filter
877 Case UCase(
"FilterOn
")
878 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
879 _getProperty = pvItem.FilterOn
880 Case UCase(
"FocusChangeTemporary
")
881 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
882 _getProperty = pvItem.FocusChangeTemporary
883 Case UCase(
"FontBold
")
884 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
885 _getProperty = pvItem.FontBold
886 Case UCase(
"FontItalic
")
887 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
888 _getProperty = pvItem.FontItalic
889 Case UCase(
"FontName
")
890 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
891 _getProperty = pvItem.FontName
892 Case UCase(
"FontSize
")
893 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
894 _getProperty = pvItem.FontSize
895 Case UCase(
"FontUnderline
")
896 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
897 _getProperty = pvItem.FontUnderline
898 Case UCase(
"FontWeight
")
899 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
900 _getProperty = pvItem.FontWeight
901 Case UCase(
"ForeColor
")
902 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
903 _getProperty = pvItem.ForeColor
904 Case UCase(
"Form
")
905 If Not Utils._CheckArgument(pvItem,
1, CTLSUBFORM) Then Goto Exit_Function
906 _getProperty = pvItem.Form
907 Case UCase(
"Format
")
908 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
909 _getProperty = pvItem.Format
910 Case UCase(
"Height
")
911 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJDIALOG)) Then Goto Exit_Function
912 _getProperty = pvItem.Height
913 Case UCase(
"Index
")
914 If Not Utils._CheckArgument(pvItem,
1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
915 _getProperty = pvItem.Index
916 Case UCase(
"IsLoaded
")
917 If Not Utils._CheckArgument(pvItem,
1, OBJFORM) Then Goto Exit_Function
918 _getProperty = pvItem.IsLoaded
919 Case UCase(
"ItemData
")
920 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
921 If IsMissing(pvIndex) Then _getProperty = pvItem.ItemData Else _getProperty = pvItem.ItemData(pvIndex)
922 Case UCase(
"KeyAlt
")
923 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
924 _getProperty = pvItem.KeyAlt
925 Case UCase(
"KeyChar
")
926 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
927 _getProperty = pvItem.KeyChar
928 Case UCase(
"KeyCode
")
929 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
930 _getProperty = pvItem.KeyCode
931 Case UCase(
"KeyCtrl
")
932 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
933 _getProperty = pvItem.KeyCtrl
934 Case UCase(
"KeyFunction
")
935 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
936 _getProperty = pvItem.KeyFunction
937 Case UCase(
"KeyShift
")
938 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
939 _getProperty = pvItem.KeyShift
940 Case UCase(
"LinkChildFields
")
941 If Not Utils._CheckArgument(pvItem,
1, OBJSUBFORM) Then Goto Exit_Function
942 If IsMissing(pvIndex) Then _getProperty = pvItem.LinkChildFields Else _getProperty = pvItem.LinkChildFields(pvIndex)
943 Case UCase(
"LinkMasterFields
")
944 If Not Utils._CheckArgument(pvItem,
1, OBJSUBFORM) Then Goto Exit_Function
945 If IsMissing(pvIndex) Then _getProperty = pvItem.LinkMasterFields Else _getProperty = pvItem.LinkMasterFields(pvIndex)
946 Case UCase(
"ListCount
")
947 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
948 _getProperty = pvItem.ListCount
949 Case UCase(
"ListIndex
")
950 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
951 _getProperty = pvItem.ListIndex
952 Case UCase(
"Locked
")
953 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
954 If IsNull(pvItem.Locked) Then Goto Trace_Error
955 _ge ExitProperty = pvItem.Locked
956 Case UCase(
"MultiSelect
")
957 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
958 _getProperty = pvItem.MultiSelect
959 Case UCase(
"Name
")
960 If Not Utils._CheckArgument(pvItem,
1, _
961 Array(OBJFORM, OBJSUBFORM, OBJCONTROL, OBJOPTIONGROUP, OBJPROPERTY, OBJDIALOG, OBJTABLEDEF, OBJRECORDSET, OBJFIELD, OBJTEMPVAR, OBJCOMMANDBAR) _
962 ) Then Goto Exit_Function
963 _getProperty = pvItem.Name
964 Case UCase(
"ObjectType
")
965 If Not Utils._CheckArgument(pvItem,
1, Array(OBJDATABASE, OBJCOLLECTION, OBJFORM, OBJDIALOG, OBJSUBFORM, OBJCONTROL _
966 , OBJEVENT, OBJOPTIONGROUP, OBJPROPERTY, OBJRECORDSET, OBJTABLEDEF, OBJFIELD, OBJTEMPVAR _
967 , OBJCOMMANDBAR, OBJCOMMANDBARCONTROL) _
968 ) Then Goto Exit_Function
969 _getProperty = pvItem.ObjectType
970 Case UCase(
"OnAction
")
971 If Not Utils._CheckArgument(pvItem,
1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
972 _getProperty = pvItem.OnAction
973 Case UCase(
"OpenArgs
")
974 If Not Utils._CheckArgument(pvItem,
1, OBJFORM) Then Goto Exit_Function
975 _getProperty = pvItem.OpenArgs
976 Case UCase(
"OptionValue
")
977 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
978 _getProperty = pvItem.OptionValue
979 Case UCase(
"OrderBy
")
980 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
981 _getProperty = pvItem.OrderBy
982 Case UCase(
"OrderByOn
")
983 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
984 _getProperty = pvItem.OrderByOn
985 Case UCase(
"Page
")
986 If Not Utils._CheckArgument(pvItem,
1, Array(OBJDIALOG, OBJCONTROL)) Then Goto Exit_Function
987 _getProperty = pvItem.Page
988 Case UCase(
"Parent
")
989 If Not Utils._CheckArgument(pvItem,
1, Array(OBJSUBFORM, OBJCONTROL, OBJCOMMANDBARCONTROL)) Then Goto Exit_Function
990 _getProperty = pvItem.Parent
991 Case UCase(
"Recommendation
")
992 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
993 _getProperty = pvItem.Recommendation
994 Case UCase(
"RecordCount
")
995 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
996 _getProperty = pvItem.RecordCount
997 Case UCase(
"Recordset
")
998 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
999 _getProperty = pvItem.Recordset
1000 Case UCase(
"RecordSource
")
1001 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
1002 _getProperty = pvItem.RecordSource
1003 Case UCase(
"Required
")
1004 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1005 _getProperty = pvItem.Required
1006 Case UCase(
"RowChangeAction
")
1007 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1008 _getProperty = pvItem.RowChangeAction
1009 Case UCase(
"RowSource
")
1010 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1011 _getProperty = pvItem.RowSource
1012 Case UCase(
"RowSourceType
")
1013 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1014 _getProperty = pvItem.RowSourceType
1015 Case UCase(
"Selected
")
1016 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1017 If IsMissing(pvIndex) Then _getProperty = pvItem.Selected Else _getProperty = pvItem.Selected(pvIndex)
1018 Case UCase(
"Size
")
1019 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
1020 _getProperty = pvItem.Size
1021 Case UCase(
"Source
")
1022 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1023 _getProperty = pvItem.Source
1024 Case UCase(
"SourceTable
")
1025 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
1026 _getProperty = pvItem.SourceTable
1027 Case UCase(
"SourceField
")
1028 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
1029 _getProperty = pvItem.SourceField
1030 Case UCase(
"SpecialEffect
")
1031 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1032 _getProperty = pvItem.SpecialEffect
1033 Case UCase(
"SubComponentName
")
1034 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1035 _getProperty = pvItem.SubComponentName
1036 Case UCase(
"SubComponentType
")
1037 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1038 _getProperty = pvItem.SubComponentType
1039 Case UCase(
"SubType
")
1040 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1041 _getProperty = pvItem.SubType
1042 Case UCase(
"TabIndex
")
1043 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1044 _getProperty = pvItem.TabIndex
1045 Case UCase(
"TabStop
")
1046 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1047 _getProperty = pvItem.TabStop
1048 Case UCase(
"Tag
")
1049 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1050 _getProperty = pvItem.Tag
1051 Case UCase(
"Text
")
1052 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1053 _getProperty = pvItem.Text
1054 Case UCase(
"TextAlign
")
1055 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1056 _getProperty = pvItem.TextAlign
1057 Case UCase(
"TooltipText
")
1058 If Not Utils._CheckArgument(pvItem,
1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
1059 _getProperty = pvItem.TooltipText
1060 Case UCase(
"TripleState
")
1061 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1062 _getProperty = pvItem.TripleState
1063 Case UCase(
"TypeName
")
1064 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
1065 _getProperty = pvItem.TypeName
1066 Case UCase(
"Value
")
1067 If Not Utils._CheckArgument(pvItem,
1, Array(OBJCONTROL, OBJOPTIONGROUP, OBJPROPERTY, OBJFIELD, OBJTEMPVAR)) Then Goto Exit_Function
1068 _getProperty = pvItem.Value
1069 Case UCase(
"Visible
")
1070 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJDIALOG, OBJCONTROL, OBJCOMMANDBAR, OBJCOMMANDBARCONTROL)) Then Goto Exit_Function
1071 _getProperty = pvItem.Visible
1072 Case UCase(
"Width
")
1073 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJDIALOG)) Then Goto Exit_Function
1074 _getProperty = pvItem.Width
1075 Case UCase(
"XPos
")
1076 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1077 If IsNull(pvItem.XPos) Then Goto Trace_Error
1078 _getProperty = pvItem.XPos
1079 Case UCase(
"YPos
")
1080 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1081 If IsNull(pvItem.YPos) Then Goto Trace_Error
1082 _getProperty = pvItem.YPos
1088 Utils._ResetCalledSub(
"get
" & psProperty)
1091 TraceError(TRACEFATAL, ERRPROPERTY, Utils._CalledSub(),
0,
1, psProperty)
1092 _getProperty = Nothing
1095 TraceError(TRACEFATAL, ERRINDEXVALUE, Utils._CalledSub(),
0,
1, psProperty)
1096 _getProperty = Nothing
1099 TraceError(TRACEABORT, Err,
"_getProperty
", Erl)
1100 _getProperty = Nothing
1102 End Function
' _getProperty V0.9
.1
1104 REM -----------------------------------------------------------------------------------------------------------------------
1105 Public Function _hasProperty(ByVal psObject As String, ByVal pvPropertiesList() As Variant, ByVal pvProperty As Variant) As Boolean
1106 ' Return True if object has a valid property called pvProperty (case-insensitive comparison !)
1107 ' Generic hasProperty function called from all class modules
1109 Dim sObject As String
1110 sObject = Utils._PCase(psObject)
1111 Utils._SetCalledSub(sObject
& ".hasProperty
")
1112 If IsMissing(pvProperty) Then Call _TraceArguments()
1114 _hasProperty = False
1115 If Not Utils._CheckArgument(pvProperty,
1, vbString) Then Goto Exit_Function
1117 _hasProperty = Utils._InList(pvProperty, pvPropertiesList(), , True)
1120 Utils._ResetCalledSub(sObject
& ".hasProperty
")
1122 End Function
' _hasProperty
1124 REM ------------------------------------------------------------------------------------------------------------------------
1125 Public Function _ParentObject(psShortcut As String) As Object
1126 ' Return parent object from shortcut as a string
1128 Dim sParent As String, vParent() As Variant, iBound As Integer
1129 vParent = Split(psShortcut,
"!
")
1130 iBound = UBound(vParent) -
1
1131 ReDim Preserve vParent(
0 To iBound)
' Remove last element
1132 sParent = Join(vParent,
"!
")
1134 'Remove
".Form
" if present
1135 Const cstForm =
".FORM
"
1136 Set _ParentObject = Nothing
1137 If Len(sParent)
> Len(cstForm) Then
1138 If UCase(Right(sParent, Len(cstForm))) = cstForm Then
1139 Set _ParentObject = getValue(sParent)
1141 Set _ParentObject = getObject(sParent)
1145 End Function
' _ParentObject V0.9
.0
1147 REM -----------------------------------------------------------------------------------------------------------------------
1148 Public Function _Properties(ByVal psObject As String _
1149 , ByVal psObjectName As String _
1150 , ByVal pvPropertiesList() As Variant _
1151 , ByVal Optional pvIndex As Variant _
1154 ' a Collection object if pvIndex absent
1155 ' a Property object otherwise
1156 ' Generic function called from Properties methods stored in classes
1158 Dim vProperties As Variant, oCounter As Object, opProperty As Object
1159 Dim iArgNr As Integer, iLen As Integer
1161 Utils._SetCalledSub(psObject
& ".Properties
")
1165 If IsMissing(pvIndex) Then
' Call without index argument prepares a Collection object
1166 Set oCounter = New Collect
1167 oCounter._CollType = COLLPROPERTIES
1168 oCounter._ParentType = UCase(psObject)
1169 oCounter._ParentName = psObjectName
1170 oCounter._Count = UBound(pvPropertiesList) +
1
1171 Set vProperties = oCounter
1173 iLen = Len(psObject) +
1
1174 If Len(_A2B_.CalledSub)
> iLen Then
1175 If Left(_A2B_.CalledSub, iLen) = psObject
& ".
" Then iArgNr =
1 Else iArgNr =
2
1177 If Not Utils._CheckArgument(pvIndex, iArgNr, Utils._AddNumeric()) Then Goto Exit_Function
1178 If pvIndex
< LBound(pvPropertiesList) Or pvIndex
> UBound(pvPropertiesList) Then
1179 TraceError(TRACEFATAL, ERRCOLLECTION, Utils._CalledSub(),
0,
1)
1181 Set opProperty = New Property
1182 opProperty._Name = pvPropertiesList(pvIndex)
1183 opProperty._Value = Null
1184 Set vProperties = opProperty
1189 Set _Properties = vProperties
1190 Utils._ResetCalledSub(psObject
& ".Properties
")
1192 End Function
' _Properties
1194 REM -----------------------------------------------------------------------------------------------------------------------
1195 Public Function _PropertiesList(pvObject As Variant) As Variant
1196 ' Return an array of strings containing the list of valid properties of pvObject
1198 Dim vProperties As Variant
1199 Dim vPropertiesList As Variant, bPropertiesList() As Boolean, sPropertiesList() As String
1200 Dim i As Integer, j As Integer, iCount As Integer
1202 Set vProperties = Nothing
1203 Select Case pvObject._Type
1204 Case OBJCOLLECTION, OBJPROPERTY, OBJFORM, OBJEVENT, OBJSUBFORM, OBJCONTROL, OBJOPTIONGROUP _
1205 , OBJDATABASE, OBJTABLEDEF, OBJQUERYDEF, OBJDIALOG, OBJFIELD, OBJRECORDSET, OBJTEMPVAR _
1206 , OBJCOMMANDBAR, OBJCOMMANDBARCONTROL
1207 vPropertiesList = pvObject._PropertiesList()
1212 Set _PropertiesList = vPropertiesList
1214 End Function
' PropertiesList V0.9
.0