473,405 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Error 438 when setting up the treeview control

Hello all,

I have a user getting an error 438, object doesn't support this prop. or
method, when I run code to setup the treeview control. I'm using the
MSCOMCTRL.OCX, file version: 6.01.9545. In my installer, I'm setting it to
always overwrite, btw. Here's my code, maybe I'm doing something that is not
compatible with a new version of MSCOMCTRL?

If I test with the user's db, all is well on my machine.

Thanks!

Andy

Public Function SetupTreeView(SetupType As String)
On Error GoTo ErrRtn
' Add Node objects.
Dim f As Form, firstnode As String, nodX As Node, NodX2 As Node, NodX3 As
Node, NodX4 As Node, db As Database, rs As Recordset, rs2 As Recordset,
criteria As String, rs3 As Recordset, rs4 As Recordset, criteria2 As String,
criteria3 As String
' Declare Node variable.
' First node with 'Root' as text.
If SetupType = "Update" Then
Set f = Forms!fUpdateParts.Form
ElseIf SetupType = "AddWizOnly" Then
Set f = Forms!AddaPartWizard.Form
ElseIf WizIsOpen("fSelectParts") = -1 Then
Set f = Forms!fSelectParts.Form
ElseIf WizIsOpen("fParts") = True Then
Forms!fParts.Form!PartCatsTreeView.Nodes.Clear
Set f = Forms!fParts.Form
End If
GoSub SetupTree
exitout:
'
'MsgBox "Finished setting up treeviews"
Exit Function
'
SetupTree:
Set db = CurrentDb()
Set rs = db.OpenRecordset("qrycboFilter", DB_OPEN_SNAPSHOT)
Set rs2 = db.OpenRecordset("qrycboFilterSub", DB_OPEN_SNAPSHOT)
Set rs3 = db.OpenRecordset("qrycboFilterSub", DB_OPEN_SNAPSHOT)
Set rs4 = db.OpenRecordset("qrycboFilterSub", DB_OPEN_SNAPSHOT)
If Not rs.BOF Then
rs.MoveFirst
firstnode = rs!CatDescription
Do Until rs.EOF
'Tree Level 1, Root
Set nodX = f!PartCatsTreeView.Nodes.Add(, , Chr(34) &
rs!PartCategoryID & Chr(34), rs!CatDescription)
' This next node is a child of Node 1 ("Root").
criteria = "CategoryOfID = " & rs!PartCategoryID
rs2.FindFirst criteria
Do Until rs2.NoMatch
'Tree Level 2
Set NodX2 = f!PartCatsTreeView.Nodes.Add(nodX, tvwChild, Chr(34)
& rs2!PartCategoryID & Chr(34), rs2!CatDescription)
criteria2 = "CategoryOfID = " & rs2!PartCategoryID
rs3.FindFirst criteria2
Do Until rs3.NoMatch
'Tree Level 3
Set NodX3 = f!PartCatsTreeView.Nodes.Add(NodX2, tvwChild,
Chr(34) & rs3!PartCategoryID & Chr(34), rs3!CatDescription)
criteria3 = "CategoryOfID = " & rs3!PartCategoryID
rs4.FindFirst criteria3
Do Until rs4.NoMatch
'Tree Level 4
Set NodX4 = f!PartCatsTreeView.Nodes.Add(NodX3,
tvwChild, Chr(34) & rs4!PartCategoryID & Chr(34), rs4!CatDescription)
rs4.FindNext criteria3
Loop
rs3.FindNext criteria2
Loop
rs2.FindNext criteria
Loop
rs.MoveNext
Loop
End If
rs.Close
rs2.Close
rs3.Close
rs4.Close
Set db = Nothing
Return
'cboFilter_NodeClick (Me!cboFilter.Nodes(firstnode))
'Set Me!cboFilter.SelectedItem = Me!cboFilter.ListItems(1)
ErrRtn:
If Err = 94 Or Err = 13 Then
MsgBox "SetupTreeView: You are missing the part type descriptions for
one or more part types. Click on the Setup button, then Part Categories tab
and fill in any missing part type descriptions.", vbCritical, "Missing Part
Category Descriptions"
Exit Function
Else
MsgBox Err.Number & " - " & Err.Description & ", Function:
SetupTreeView", vbCritical
End If
Exit Function
End Function

Nov 11 '08 #1
0 2323

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: SoKool | last post by:
Can anyone point me to a site where I can get a free treeview control to use in ASP .NET or any tutorial that can help me build my own treeview control. I intend to use a treeview to generate a...
3
by: Alphonse Giambrone | last post by:
I have been using the IE Treeview for several months and it has been working fine until recently. Now on my development machine I get a runtime error when the page loads or the mouse moves over...
0
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
0
by: MarkD | last post by:
I have an ASP.NET (VB.NET) application that calls all VB6 COM DLL via Interop. The DLL uses functionality contained in a Custom OCX Control (Also VB6) that in turn contains a standard TreeView...
3
by: Peter | last post by:
Hello, We are inserting a side menu to our application using a class that is writing HTML on all our pages. This is a part of the code as an example: writer.Write(" <table WIDTH=""100%""...
1
by: itmanager | last post by:
We are using Microsoft's treeview.htc control to display a tree control in our .NET application. When displaying the tree, the browser returns the error: Dynamic Link Library (DLL)...
0
by: Chris | last post by:
I am using the formview control. Within its edit template I have a treeview, which I populate programatically. Initially I had an item template in which I had a button, which triggered the edit...
5
by: igotyourdotnet | last post by:
On my web app, I have a custom error page which the user sees, I then email the actaul error to myself since the site is up 24/7. I added the email portion to my app but now I can't see the user...
0
by: apenly | last post by:
Hi all- I'm trying to Render a TreeView in a custom control, but I'm receiving a NullReferenceException at runtime. If I put the TreeView on the page it works fine, but as soon as I try to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.