REM ======================================================================================================================= REM === The Access2Base library is a part of the LibreOffice project. === REM === Full documentation is available on http://www.access2base.com === REM ======================================================================================================================= Option Explicit REM ----------------------------------------------------------------------------------------------------------------------- Public Function setAbsolutePosition(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean ' Only for open forms If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setAbsolutePosition") setAbsolutePosition = PropertiesSet._setProperty(pvObject, "AbsolutePosition", pvValue) End Function ' setAbsolutePosition REM ----------------------------------------------------------------------------------------------------------------------- Public Function setAllowAdditions(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean ' Only for open forms If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setAllowAdditions") setAllowAdditions = PropertiesSet._setProperty(pvObject, "AllowAdditions", pvValue) End Function ' setAllowAdditions REM ----------------------------------------------------------------------------------------------------------------------- Public Function setAllowDeletions(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean ' Only for open forms If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setAllowDeletions") setAllowDeletions = PropertiesSet._setProperty(pvObject, "AllowDeletions", pvValue) End Function ' setAllowDeletions REM ----------------------------------------------------------------------------------------------------------------------- Public Function setAllowEdits(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean ' Only for open forms If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setAllowEdits") setAllowEdits = PropertiesSet._setProperty(pvObject, "AllowEdits", pvValue) End Function ' setAllowEdits REM ----------------------------------------------------------------------------------------------------------------------- Public Function setBackColor(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setBackColor") setBackColor = PropertiesSet._setProperty(pvObject, "BackColor", pvValue) End Function ' setBackColor REM ----------------------------------------------------------------------------------------------------------------------- Public Function setBookmark(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setBookmark") setBookmark = PropertiesSet._setProperty(pvObject, "Bookmark", pvValue) End Function ' setBookmark REM ----------------------------------------------------------------------------------------------------------------------- Public Function setBorderColor (Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setBorderColor") setBorderColor = PropertiesSet._setProperty(pvObject, "BorderColor", pvValue) End Function ' setBorderColor REM ----------------------------------------------------------------------------------------------------------------------- Public Function setBorderStyle(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setBorderStyle") setBorderStyle = PropertiesSet._setProperty(pvObject, "BorderStyle", pvValue) End Function ' setBorderStyle REM ----------------------------------------------------------------------------------------------------------------------- Public Function setCancel(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setCancel") setCancel = PropertiesSet._setProperty(pvObject, "Cancel", pvValue) End Function ' setCancel REM ----------------------------------------------------------------------------------------------------------------------- Public Function setCaption(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setCaption") setCaption = PropertiesSet._setProperty(pvObject, "Caption", pvValue) End Function ' setCaption REM ----------------------------------------------------------------------------------------------------------------------- Public Function setControlTipText(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setControlTipText") setControlTipText = PropertiesSet._setProperty(pvObject, "ControlTipText", pvValue) End Function ' setControlTipText REM ----------------------------------------------------------------------------------------------------------------------- Public Function setCurrentRecord(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setCurrentRecord") setCurrentRecord = PropertiesSet._setProperty(pvObject, "CurrentRecord", pvValue) End Function ' setCurrentRecord REM ----------------------------------------------------------------------------------------------------------------------- Public Function setDefault(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setDefault") setDefault = PropertiesSet._setProperty(pvObject, "Default", pvValue) End Function ' setDefault REM ----------------------------------------------------------------------------------------------------------------------- Public Function setDefaultValue(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setDefaultValue") setDefaultValue = PropertiesSet._setProperty(pvObject, "DefaultValue", pvValue) End Function ' setDefaultValue REM ----------------------------------------------------------------------------------------------------------------------- Public Function setDescription(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setDescription") setDescription = PropertiesSet._setProperty(pvObject, "Description", pvValue) End Function ' setDescription REM ----------------------------------------------------------------------------------------------------------------------- Public Function setEnabled(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setEnabled") setEnabled = PropertiesSet._setProperty(pvObject, "Enabled", pvValue) End Function ' setEnabled REM ----------------------------------------------------------------------------------------------------------------------- Public Function setFilter(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setFilter") setFilter = PropertiesSet._setProperty(pvObject, "Filter", pvValue) End Function ' setFilter REM ----------------------------------------------------------------------------------------------------------------------- Public Function setFilterOn(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean ' Only for open forms If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setFilterOn") setFilterOn = PropertiesSet._setProperty(pvObject, "FilterOn", pvValue) End Function ' setFilterOn REM ----------------------------------------------------------------------------------------------------------------------- Public Function setFontBold(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setFontBold") setFontBold = PropertiesSet._setProperty(pvObject, "FontBold", pvValue) End Function ' setFontBold REM ----------------------------------------------------------------------------------------------------------------------- Public Function setFontItalic(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setFontItalic") setFontItalic = PropertiesSet._setProperty(pvObject, "FontItalic", pvValue) End Function ' setFontItalic REM ----------------------------------------------------------------------------------------------------------------------- Public Function setFontName(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setFontName") setFontName = PropertiesSet._setProperty(pvObject, "FontName", pvValue) End Function ' setFontName REM ----------------------------------------------------------------------------------------------------------------------- Public Function setFontSize(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setFontSize") setFontSize = PropertiesSet._setProperty(pvObject, "FontSize", pvValue) End Function ' setFontSize REM ----------------------------------------------------------------------------------------------------------------------- Public Function setFontUnderline(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setFontUnderline") setFontUnderline = PropertiesSet._setProperty(pvObject, "FontUnderline", pvValue) End Function ' setFontUnderline REM ----------------------------------------------------------------------------------------------------------------------- Public Function setFontWeight(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setFontWeight") setFontWeight = PropertiesSet._setProperty(pvObject, "FontWeight", pvValue) End Function ' setFontWeight REM ----------------------------------------------------------------------------------------------------------------------- Public Function setForeColor(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setForeColor") setForeColor = PropertiesSet._setProperty(pvObject, "ForeColor", pvValue) End Function ' setForeColor REM ----------------------------------------------------------------------------------------------------------------------- Public Function setHeight(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean ' Only for open forms If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setHeight") setHeight = PropertiesSet._setProperty(pvObject, "Height", pvValue) End Function ' setHeight REM ----------------------------------------------------------------------------------------------------------------------- Public Function setListIndex(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setListIndex") setListIndex = PropertiesSet._setProperty(pvObject, "ListIndex", pvValue) End Function ' setListIndex REM ----------------------------------------------------------------------------------------------------------------------- Public Function setLocked(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setLocked") setLocked = PropertiesSet._setProperty(pvObject, "Locked", pvValue) End Function ' setLocked REM ----------------------------------------------------------------------------------------------------------------------- Public Function setMultiSelect(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setMultiSelect") setMultiSelect = PropertiesSet._setProperty(pvObject, "MultiSelect", pvValue) End Function ' setMultiSelect REM ----------------------------------------------------------------------------------------------------------------------- Public Function setOnAction(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setOnAction") setOnAction = PropertiesSet._setProperty(pvObject, "OnAction", pvValue) End Function ' setOnAction REM ----------------------------------------------------------------------------------------------------------------------- Public Function setOptionValue(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setOptionValue") setOptionValue = PropertiesSet._setProperty(pvObject, "OptionValue", pvValue) End Function ' setOptionValue REM ----------------------------------------------------------------------------------------------------------------------- Public Function setOrderBy(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setOrderBy") setOrderBy = PropertiesSet._setProperty(pvObject, "OrderBy", pvValue) End Function ' setOrderBy REM ----------------------------------------------------------------------------------------------------------------------- Public Function setOrderByOn(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean ' Only for open forms If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setOrderByOn") setOrderByOn = PropertiesSet._setProperty(pvObject, "OrderByOn", pvValue) End Function ' setOrderByOn REM ----------------------------------------------------------------------------------------------------------------------- Public Function setPage(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setPage") setPage = PropertiesSet._setProperty(pvObject, "Page", pvValue) End Function ' setPage V0.9.1 REM ----------------------------------------------------------------------------------------------------------------------- Public Function setProperty(Optional pvItem As Variant, ByVal Optional psProperty As String, ByVal Optional pvValue As Variant, ByVal Optional pvIndex As Variant) As Variant ' Return True if property setting OK Utils._SetCalledSub("setProperty") If IsMissing(pvItem) Or IsMissing(psProperty) Or IsMissing(pvValue) Or IsEmpty(pvItem) Then Call _TraceArguments() If IsMissing(pvIndex) Then setProperty = PropertiesSet._setProperty(pvItem, psProperty, pvValue) Else setProperty = PropertiesSet._setProperty(pvItem, psProperty, pvValue, pvIndex) End If Utils._ResetCalledSub("setProperty") End Function REM ----------------------------------------------------------------------------------------------------------------------- Public Function setRecordSource(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean ' Only for open forms If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setRecordSource") setRecordSource = PropertiesSet._setProperty(pvObject, "RecordSource", pvValue) End Function ' setRecordSource REM ----------------------------------------------------------------------------------------------------------------------- Public Function setRequired(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setRequired") setRequired = PropertiesSet._setProperty(pvObject, "Required", pvValue) End Function ' setRequired REM ----------------------------------------------------------------------------------------------------------------------- Public Function setRowSource(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setRowSource") setRowSource = PropertiesSet._setProperty(pvObject, "RowSource", pvValue) End Function ' setRowSource REM ----------------------------------------------------------------------------------------------------------------------- Public Function setRowSourceType(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setRowSourceType") setRowSourceType = PropertiesSet._setProperty(pvObject, "RowSourceType", pvValue) End Function ' setRowSourceType REM ----------------------------------------------------------------------------------------------------------------------- Public Function setSelected(Optional pvObject As Variant, ByVal Optional pvValue As Variant, ByVal Optional pvIndex As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Then Call _TraceArguments("setSelected") If IsEmpty(pvObject) Then Call _TraceArguments("setSelected") If IsMissing(pvIndex) Then setSelected = PropertiesSet._setProperty(pvObject, "Selected", pvValue) Else setSelected = PropertiesSet._setProperty(pvObject, "Selected", pvValue, pvIndex) End If End Function ' setSelected REM ----------------------------------------------------------------------------------------------------------------------- Public Function setSelLength(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setSelLength") setSelLength = PropertiesSet._setProperty(pvObject, "SelLength", pvValue) End Function ' setSelLength REM ----------------------------------------------------------------------------------------------------------------------- Public Function setSelStart(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setSelStart") setSelStart = PropertiesSet._setProperty(pvObject, "SelStart", pvValue) End Function ' setSelStart REM ----------------------------------------------------------------------------------------------------------------------- Public Function setSelText(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setSelText") setSelText = PropertiesSet._setProperty(pvObject, "SelText", pvValue) End Function ' setSelText REM ----------------------------------------------------------------------------------------------------------------------- Public Function setSpecialEffect(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setSpecialEffect") setSpecialEffect = PropertiesSet._setProperty(pvObject, "SpecialEffect", pvValue) End Function ' setSpecialEffect REM ----------------------------------------------------------------------------------------------------------------------- Public Function setTabIndex(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setTabIndex") setTabIndex = PropertiesSet._setProperty(pvObject, "TabIndex", pvValue) End Function ' setTabIndex REM ----------------------------------------------------------------------------------------------------------------------- Public Function setTabStop(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setTabStop") setTabStop = PropertiesSet._setProperty(pvObject, "TabStop", pvValue) End Function ' setTabStop REM ----------------------------------------------------------------------------------------------------------------------- Public Function setTag(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setTag") setTag = PropertiesSet._setProperty(pvObject, "Tag", pvValue) End Function ' setTag REM ----------------------------------------------------------------------------------------------------------------------- Public Function setTextAlign(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setTextAlign") setTextAlign = PropertiesSet._setProperty(pvObject, "TextAlign", pvValue) End Function ' setTextAlign REM ----------------------------------------------------------------------------------------------------------------------- Public Function setTooltipText(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setTooltipText") setTooltipText = PropertiesSet._setProperty(pvObject, "TooltipText", pvValue) End Function ' setTooltipText REM ----------------------------------------------------------------------------------------------------------------------- Public Function setTripleState(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setTripleState") setTripleState = PropertiesSet._setProperty(pvObject, "TripleState", pvValue) End Function ' setTripleState REM ----------------------------------------------------------------------------------------------------------------------- Public Function setValue(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean ' setValue also interprets shortcut strings !! Dim vItem As Variant, sProperty As String If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setValue") If VarType(pvObject) = vbString Then Utils._SetCalledSub("setValue") Set vItem = getObject(pvObject) sProperty = Utils._FinalProperty(pvObject) If sProperty = "" Then sProperty = "Value" setValue = vItem.setProperty(sProperty, pvValue) Utils._ResetCalledSub("setValue") Else Set vItem = pvObject setValue = vItem.setProperty("Value", pvValue) End If End Function ' setValue REM ----------------------------------------------------------------------------------------------------------------------- Public Function setVisible(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean ' Only for open forms and controls If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setVisible") setVisible = PropertiesSet._setProperty(pvObject, "Visible", pvValue) End Function ' setVisible REM ----------------------------------------------------------------------------------------------------------------------- Public Function setWidth(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean ' Only for open forms If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments("setWidth") setWidth = PropertiesSet._setProperty(pvObject, "Width", pvValue) End Function ' setWidth REM ----------------------------------------------------------------------------------------------------------------------- REM --- PRIVATE FUNCTIONS --- REM ----------------------------------------------------------------------------------------------------------------------- Private Function _CheckProperty(pvObject As Object, ByVal psProperty As String) As Boolean ' Return False if psProperty not within the PropertyValues set of pvItem Dim i As Integer, oPropertyValues As Variant, oProperty As Variant oPropertyValues = pvObject.PropertyValues For i = LBound(oPropertyValues) To UBound(oPropertyValues) oProperty = oPropertyValues(i) If UCase(oProperty.Name) = UCase(psProperty) Then _CheckProperty = True Exit Function End If Next i _CheckProperty = False Exit Function End Function ' CheckProperty V0.7.5 REM ----------------------------------------------------------------------------------------------------------------------- Private Function _setProperty(pvItem As Variant, ByVal psProperty As String, ByVal pvValue As Variant, ByVal Optional pvIndex As Variant) As Boolean ' Return True if property setting OK Utils._SetCalledSub("set" & psProperty) If _ErrorHandler() Then On Local Error Goto Error_Function 'pvItem must be an object and have the requested property If Not Utils._CheckArgument(pvItem, 1, vbObject) Then Goto Exit_Function 'Check Index argument If Not IsMissing(pvIndex) Then If Not Utils._CheckArgument(pvIndex, 4, Utils._AddNumeric()) Then Goto Exit_Function End If 'Execute Dim iArgNr As Integer, lFormat As Long Dim i As Integer, iCount As Integer, iSelectedItems() As Integer, bListboxBound As Boolean Dim odbDatabase As Object, vNames As Variant, bFound As Boolean, sName As String, oModel As Object Dim ocButton As Variant, iRadioIndex As Integer _setProperty = True If _A2B_.CalledSub = "setProperty" Then iArgNr = 3 Else iArgNr = 2 If Not PropertiesGet._hasProperty(pvItem._Type, pvItem._PropertiesList(), psProperty) Then Goto Trace_Error_Control Select Case UCase(psProperty) Case UCase("AbsolutePosition") If Not Utils._CheckArgument(pvItem, 1, OBJRECORDSET) Then Goto Exit_Function pvItem.AbsolutePosition = pvValue Case UCase("AllowAdditions") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function pvItem.AllowAdditions = pvValue Case UCase("AllowDeletions") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function pvItem.AllowDeletions = pvValue Case UCase("AllowEdits") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function pvItem.AllowEdits = pvValue Case UCase("BackColor") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.BackColor = pvValue Case UCase("Bookmark") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJRECORDSET)) Then Goto Exit_Function pvItem.Bookmark = pvValue Case UCase("BorderColor") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.BorderColor = pvValue Case UCase("BorderStyle") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.BorderColor = pvValue Case UCase("Cancel") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.Cancel = pvValue Case UCase("Caption") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG, OBJCONTROL)) Then Goto Exit_Function pvItem.Caption = pvValue Case UCase("ControlTipText") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.ControlTipText = pvValue Case UCase("CurrentRecord") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function pvItem.CurrentRecord = pvValue Case UCase("Default") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.Default = pvValue Case UCase("DefaultValue") If Not Utils._CheckArgument(pvItem, 1, Array(OBJCONTROL, OBJFIELD)) Then Goto Exit_Function pvItem.DefaultValue = pvValue Case UCase("Description") If Not Utils._CheckArgument(pvItem, 1, OBJFIELD) Then Goto Exit_Function pvItem.DefaultValue = pvValue Case UCase("Enabled") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.Enabled = pvValue Case UCase("Filter") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM, OBJRECORDSET)) Then Goto Exit_Function pvItem.Filter = pvValue Case UCase("FilterOn") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function pvItem.FilterOn = pvValue Case UCase("FontBold") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.FontBold = pvValue Case UCase("FontItalic") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.FontItalic = pvValue Case UCase("FontName") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.FontName = pvValue Case UCase("FontSize") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.FontSize = pvValue Case UCase("FontUnderline") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.FontUnderline = pvValue Case UCase("FontWeight") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.FontWeight = pvValue Case UCase("ForeColor") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.ForeColor = pvValue Case UCase("Height") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG)) Then Goto Exit_Function pvItem.Height = pvValue Case UCase("ListIndex") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.ListIndex = pvValue Case UCase("Locked") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.Locked = pvValue Case UCase("MultiSelect") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.MultiSelect = pvValue Case UCase("OnAction") If Not Utils._CheckArgument(pvItem, 1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function pvItem.OnAction = pvValue Case UCase("OptionValue") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.OptionValue = pvValue Case UCase("OrderBy") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function pvItem.OrderBy = pvValue Case UCase("OrderByOn") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function pvItem.OrderByOn = pvValue Case UCase("Page") If Not Utils._CheckArgument(pvItem, 1, Array(OBJDIALOG, OBJCONTROL)) Then Goto Exit_Function pvItem.Page = pvValue Case UCase("RecordSource") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function pvItem.RecordSource = pvValue Case UCase("Required") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.Required = pvValue Case UCase("RowSource") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.RowSource = pvValue Case UCase("RowSourceType") ' Refresh done when RowSource changes, not RowSourceType If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.RowSourceType = pvValue Case UCase("Selected") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function If IsMissing(pvIndex) Then pvItem.Selected = pvValue Else pvItem.SelectedI(pvValue, pvIndex) Case UCase("SelLength") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.SelLength = pvValue Case UCase("SelStart") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.SelStart = pvValue Case UCase("SelText") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.SelText = pvValue Case UCase("SpecialEffect") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.SpecialEffect = pvValue Case UCase("TabIndex") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.TabIndex = pvValue Case UCase("TabStop") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.TabStop = pvValue Case UCase("Tag") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.Tag = pvValue Case UCase("TextAlign") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.TextAlign = pvValue Case UCase("TooltipText") If Not Utils._CheckArgument(pvItem, 1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function pvItem.TooltipText = pvValue Case UCase("TripleState") If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function pvItem.TripleState = pvValue Case UCase("Value") If Not Utils._CheckArgument(pvItem, 1, Array(OBJCONTROL, OBJOPTIONGROUP, OBJFIELD, OBJTEMPVAR)) Then Goto Exit_Function pvItem.Value = pvValue Case UCase("Visible") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG, OBJCONTROL, OBJCOMMANDBAR, OBJCOMMANDBARCONTROL)) Then Goto Exit_Function pvItem.Visible = pvValue Case UCase("Width") If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG)) Then Goto Exit_Function pvItem.Width = pvValue Case Else Goto Trace_Error_Control End Select Exit_Function: Utils._ResetCalledSub("set" & psProperty) Exit Function Trace_Error_Form: TraceError(TRACEFATAL, ERRFORMNOTFOUND, Utils._CalledSub(), 0, 1, pvItem._Name) _setProperty = False Goto Exit_Function Trace_Error_Control: TraceError(TRACEFATAL, ERRPROPERTY, Utils._CalledSub(), 0, 1, psProperty) _setProperty = False Goto Exit_Function Trace_Error_Value: TraceError(TRACEFATAL, ERRPROPERTYVALUE, Utils._CalledSub(), 0, 1, Array(pvValue, psProperty)) _setProperty = False Goto Exit_Function Trace_Error_Index: TraceError(TRACEFATAL, ERRINDEXVALUE, Utils._CalledSub(), 0, 1, psProperty) _setProperty = Nothing Goto Exit_Function Trace_Error_Array: TraceError(TRACEFATAL, ERRPROPERTYNOTARRAY, Utils._CalledSub(), 0, 1, iArgNr) _setProperty = Nothing Goto Exit_Function Error_Function: TraceError(TRACEABORT, Err, "_setProperty", Erl) GoTo Exit_Function End Function ' _setProperty V0.9.1