473,748 Members | 7,118 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(S etupType 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!fUpdatePa rts.Form
ElseIf SetupType = "AddWizOnly " Then
Set f = Forms!AddaPartW izard.Form
ElseIf WizIsOpen("fSel ectParts") = -1 Then
Set f = Forms!fSelectPa rts.Form
ElseIf WizIsOpen("fPar ts") = True Then
Forms!fParts.Fo rm!PartCatsTree View.Nodes.Clea r
Set f = Forms!fParts.Fo rm
End If
GoSub SetupTree
exitout:
'
'MsgBox "Finished setting up treeviews"
Exit Function
'
SetupTree:
Set db = CurrentDb()
Set rs = db.OpenRecordse t("qrycboFilter ", DB_OPEN_SNAPSHO T)
Set rs2 = db.OpenRecordse t("qrycboFilter Sub", DB_OPEN_SNAPSHO T)
Set rs3 = db.OpenRecordse t("qrycboFilter Sub", DB_OPEN_SNAPSHO T)
Set rs4 = db.OpenRecordse t("qrycboFilter Sub", DB_OPEN_SNAPSHO T)
If Not rs.BOF Then
rs.MoveFirst
firstnode = rs!CatDescripti on
Do Until rs.EOF
'Tree Level 1, Root
Set nodX = f!PartCatsTreeV iew.Nodes.Add(, , Chr(34) &
rs!PartCategory ID & Chr(34), rs!CatDescripti on)
' This next node is a child of Node 1 ("Root").
criteria = "CategoryOf ID = " & rs!PartCategory ID
rs2.FindFirst criteria
Do Until rs2.NoMatch
'Tree Level 2
Set NodX2 = f!PartCatsTreeV iew.Nodes.Add(n odX, tvwChild, Chr(34)
& rs2!PartCategor yID & Chr(34), rs2!CatDescript ion)
criteria2 = "CategoryOf ID = " & rs2!PartCategor yID
rs3.FindFirst criteria2
Do Until rs3.NoMatch
'Tree Level 3
Set NodX3 = f!PartCatsTreeV iew.Nodes.Add(N odX2, tvwChild,
Chr(34) & rs3!PartCategor yID & Chr(34), rs3!CatDescript ion)
criteria3 = "CategoryOf ID = " & rs3!PartCategor yID
rs4.FindFirst criteria3
Do Until rs4.NoMatch
'Tree Level 4
Set NodX4 = f!PartCatsTreeV iew.Nodes.Add(N odX3,
tvwChild, Chr(34) & rs4!PartCategor yID & Chr(34), rs4!CatDescript ion)
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_Node Click (Me!cboFilter.N odes(firstnode) )
'Set Me!cboFilter.Se lectedItem = Me!cboFilter.Li stItems(1)
ErrRtn:
If Err = 94 Or Err = 13 Then
MsgBox "SetupTreeV iew: 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 2342

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

Similar topics

5
19891
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 dynamic menu by collating data from a Sql Server Table. Many thanks.
3
1351
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 the node link. When viewing the webpage from via the webhost, I don't get any error, but when clicking on the - to collapse a node the entire tree disappears. On my develoopment machine (IE6, WIN XP Pro), the error is 'Access Denied'. By debugging,...
0
1596
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" AutoPostBackOnNodeMove="false" DragAndDropEnabled="true" NodeEditingEnabled="False" KeyboardEnabled="true" CssClass="TreeView" NodeCssClass="TreeNode" SelectedNodeCssClass="SelectedTreeNode" HoverNodeCssClass="HoverTreeNode" NodeEditCssClass="NodeEdit"
0
2487
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 control. The Custom OCX is not used for visual purposes, but has some functionality that we require (hence hosting an OCX in a DLL). Everything worked fine until we installed the latest service pack for each respective windows operating system:...
3
2832
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%"" BORDER=""0"" CELLSPACING=""0"" CELLPADDING=""0"" ID=""Table1""> " & vbNewLine) writer.Write(" <tr>" & vbNewLine) writer.Write(" <td>" & vbNewLine)
1
2056
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) initialization routine failed pointing to the following line in treeview.htc: if(oItem.filters.length>0)
0
1115
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 template. The treeview was populated with the following code Protected Sub FormView1_ItemCreated(ByVal sender As Object, ByVal e As System.EventArgs) If FormView1.CurrentMode = FormViewMode.Edit Or FormView1.CurrentMode = FormViewMode.Insert Then...
5
1771
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 friendly error page. How can i still show the user friendly error page and email myself the erorr when my page or sites 'breaks'
0
2486
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 render it within my control it crashes and burns. I've even tried placing it within another control (a PlaceHolder) and tried to render the PlaceHolder to no avail. Any ideas on how to fix this problem? Here's my code:
0
8823
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9530
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8237
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4593
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.