Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Missing ActiveX Control ??

Posted on 2006-07-13
Medium Priority
Last Modified: 2016-08-29
I will appreciate any help in figuring out any ACTIVE X control I may be missing here.

I have recently re-installed, Microsoft Access 2003. After installation I opened my db and  suddenly discovered my switchboard code displaying

compile error - Run-time error '438':
"Object support this object of property method.


      .Redraw = False

from the code below:

' ..........................
' .........................
 If gfDebug Then
      'Print some info to the debug-window
      rsItems.MoveLast: rsItems.MoveFirst
      Debug.Print GetUserLogon & " (" & getUserLevel & " / " & getUserLevel_Title & "): " & _
         rsItems.RecordCount & " item(s) accessible"
   End If
         .Redraw = False

   With vsfg
      mfSkip_RowColChange = True
      .Redraw = False                                                                  ' <<<------ Error line.
      .Rows = 0: .FixedRows = 0: .Cols = 4: .FixedCols = 0
      .ExtendLastCol = True
      .OutlineBar = flexOutlineBarSimpleLeaf 'flexOutlineBarSymbolsLeaf flexOutlineBarComplete
      .GridLines = flexGridNone
      .AutoSearch = flexSearchFromCursor
      .ScrollTrack = True
      .AllowSelection = False 'no selection of more than a single cell!
      .AllowBigSelection = False
      .SelectionMode = flexSelectionByRow ' flexSelectionFree
      .AllowUserResizing = flexResizeNone
      .Ellipsis = flexEllipsisEnd
      .HighLight = flexHighlightAlways 'flexHighlightWithFocus
      .FocusRect = flexFocusLight ' flexFocusSolid ' flexFocusNone
      .MergeCells = flexMergeNever
      '.TreeColor =
      .ColWidth(0) = 0        '1st Column:   Item-ID (as in L_tbl_Switchboard_Items)
      .ColWidth(1) = 0        '2nd Column:   Whether or not a node contains children
      .ColWidth(2) = 0        '3rd Column:   Descriptive text that is being shown in the
                              '              Switchboard's right section
      .ColWidth(3) = 400      '4th Column:   Caption being shown in the treeview
      .OutlineCol = 3
      'Add the "Home"-node
      vsfg.AddItem "0" & vbTab & "" & vbTab & "" & vbTab & "Home"
      vsfg.IsSubtotal(0) = True

      With rsNodes
         'Default: Add all items
         fAdd = True
         'Loop through all switchboard-items, adding them to the treeview
         While Not .EOF
            'Assemble a key for this node, consisting of four arguments:
            '  1. The ID - required to find a child-node's parent
            '  2. Whether or not this is a node with items on it (True=Items present, False=None)
            '  3. A node's description, to be shown in the SB's top-label
            'If !SB_ID = 9 Then Stop
            rsItems.FindFirst "SI_ParentID = " & CStr(!SB_ID) & " AND SI_MinPermissionLevel >= " & CStr(lngAccessLevel)
            strItem = !SB_ID & vbTab & CStr(Not rsItems.NoMatch) & vbTab & !SB_NodeDescription & vbTab & !SB_NodeTitle
            If rsItems!SI_Requires_AllowChangingBE Then
               'Additionally check whether the current user has an active AllowChangingBE-flag
               fAdd = getUserFlag_AllowChangingBE
            End If
            If fAdd Then
               If !SB_Parent > 0 Then
                  'This node is a child-node of some other node;
                  'Find the parent node and add it below that node's last child
                  lngRow = getNodeIndex(!SB_Parent) + 1
                  vsfg.AddItem strItem, lngRow
                  vsfg.IsSubtotal(lngRow) = True
                  vsfg.RowOutlineLevel(lngRow) = vsfg.RowOutlineLevel(lngRow - 1) + 1
                  'There is no parent - add this node to the treeview's root (being the Home-node)
                  vsfg.AddItem strItem
                  vsfg.IsSubtotal(vsfg.Rows - 1) = True
                  vsfg.RowOutlineLevel(vsfg.Rows - 1) = vsfg.RowOutlineLevel(0) + 1
               End If
            End If
      End With
      .RowHeight(-1) = 350
      .Row = 0
   End With

   '*** Bill:
   'While adding nodes, there might be branches without any children due to the fact that the current user
   'may not access any object on that hierarchy-level.
   'Hence, remove all nodes that have neither children nor a value within the Object-Type (making them parent-nodes)
   For lngCounter = vsfg.Rows - 1 To 1 Step -1
      'Debug.Print "Row " & lngCounter & ": " & Replace(vsfg.Cell(flexcpText, lngCounter, 0, lngCounter, 3), vbCrLf, "")
      If vsfg.GetNodeRow(lngCounter, flexNTFirstChild) < 0 _
            And (Not CBool(vsfg.TextMatrix(lngCounter, mconTV_Col__1_HasChildren))) Then
         vsfg.RemoveItem lngCounter
      End If
   Next lngCounter
   'Add an Exit-entry to the tree (last item);
   'See the vsfg_RowColChange-sub to learn how this is used!
   vsfg.AddItem "0" & vbTab & "" & vbTab & "" & vbTab & "Exit"
   vsfg.RowOutlineLevel(vsfg.Rows - 1) = 1
   vsfg.IsSubtotal(vsfg.Rows - 1) = True
   vsfg.Redraw = True
   ShowPage True
   'Clean up
   Set rsNodes = Nothing
   Set rsItems = Nothing
   mfSkip_RowColChange = False
End Sub
Question by:billcute
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 35

Expert Comment

ID: 17105017
I have read through this; the problem seems to be with

You have not included in your code what sort of object vsfg is - if you can determine this then that is what is required - once we can determine that  - go to references and add the correct reference to the control.
LVL 44

Expert Comment

ID: 17105496
in this part of the code:

If gfDebug Then
      'Print some info to the debug-window
      rsItems.MoveLast: rsItems.MoveFirst
      Debug.Print GetUserLogon & " (" & getUserLevel & " / " & getUserLevel_Title & "): " & _
         rsItems.RecordCount & " item(s) accessible"
   End If
         .Redraw = False

what does the .Redraw = False refer to, as it appears to be outside any valid With...End With block.

the syntax

.<property> = Value

can ONLY be used within a


End With

block, and I don't see one the encloses the

.Redraw = False

line of code.

You immediately follow the offending line with a new

With...End With block , refering to the variable

vsgf, where you indicate the error occurs.  What kind of object is vsfg?  And does that class in fact have a Redraw property?



Author Comment

ID: 17106903
To Experts,
The code behind my Switchboard that are relevant to this topic is too long..so I have decided to upload the sample.

Unfortunately, I have problems with the upload as such I have requested CS for assistance. The link to my uploaded file will; be availbale as soon as CS acted on it.

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

LVL 65

Expert Comment

ID: 17106952
Bill, in vba window, go to Tools/References

do u see any references listed as broken

Now on design view of your switchboard form, go to the activex control and look at the properties for that

What is the OLE CLass
and what is in Class
they sound the same but are two seperate properties

Author Comment

ID: 17107090
There is no broken reference and no reference to an OLE Class on the design of the form.

However the design shows:

Picture = (none)
Picture Type = Embedded
Picture Size mode = Clip


Author Comment

ID: 17107129
I tried importing the switchboard form to a new db...and I am getting this error:

"There was an error loading an ActiveX Control on one of your forms or report....but when I check the Reference Library - nothing was missing.

LVL 65

Accepted Solution

rockiroads earned 1000 total points
ID: 17107192
Thats not an ActiveX control is it? thats just a image control. This is what Access puts for unknown/unregisterd Active X controls.

Taking an educated guess, were you using some kind of grid? something like a MSFlexGrid?

If so then what I suggest u do is this

Go to vba window, go to Tools/References
click on Browse
select filetype OCX
find msflxgrd.ocx
click OK
it should come back with Microsoft Flexgrid Control checked

There is another flexgrid control, but Im hoping its this one

Author Comment

ID: 17107381
I searched for Msflxgrd.ocx, in my OS system - there was none.

However, the following files are the registered OCX for the Switchboard. They are registered however
ComponentOne VsFlexgrid 8.0 (Light)

registered files:

LVL 39

Assisted Solution

stevbe earned 1000 total points
ID: 17107410
ok ... open references, uncheck any reference, close references, open references and re-select what you just unselected. I have seen this type of behavior on upgrades, re-installs etc. make sure you close the references between unselect and re-select.
LVL 65

Expert Comment

ID: 17107556
Thats the one, thats the grid control you are using. I took an educated guess reading your code and thought it looked like grid controls

Since u say u do not have any listed as MISSING, u can try this
Is it already checked? if so, just uncheck and recheck like Steve as mentioned
Or uncheck
Now you dont have it or u have just unchecked it
What u do is follow the instructions I gave earlier but this time look for VSFLEX8l.ocx

You have 2 files, I think 8 must be a later version that 3


Author Comment

ID: 17113946
stevbe / rockiroads,
CS finally sent me the link to my sample for posting this morning. However, the link is no longer required as both of your suggestions helped in resolving the problem. I got the Switchboard running again.

I will be splitting the points.


Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question