PC Review


Reply
Thread Tools Rate Thread

Run-time error '2147217900 (80040e14)

 
 
Kro
Guest
Posts: n/a
 
      16th Mar 2008
I have a tree list control I want to populate with Categories based on a
Client. The client number is input into a text box & then the update event
populates the tree based on the selection. I get a syntax error when it
tries to open the recordset based on the SQL. Two tables are invloved
(Client & Categories; in a 1-to-many relationship on pID field). Here'e the
code:

Dim rstCategory As New ADODB.recordset, rstComponent As New ADODB.recordset
Dim rstSubComponent As New ADODB.recordset
Dim tvwTree As Object
Dim nodX As Node
Dim I As Integer
Dim blnAllRecs As Boolean
Dim SQL As String


Set tvwTree = Me.tvwItems

'Renumber all items
RenumberItems

'Clear out all current items
tvwTree.Nodes.Clear

'Set blnAllRecs to use in query building
If Me.fmeView = 1 Then
blnAllRecs = False
Else
blnAllRecs = True
End If

'Build recordset for Categories (from a pre-selected client) at top level
SQL = "SELECT Categories.pID, Categories.catID, Categories.catName " & _
"FROM Categories " & _
"WHERE Categories.pID = " & Forms!frmComponents!txtpID & _
"ORDER BY Categories.catName"

rstCategory.Open SQL, CurrentProject.Connection, adOpenStatic,
adLockReadOnly


Any suggestions?
--
Kro
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error! Error! IE Error! Helpless Windows XP Internet Explorer 1 7th Mar 2004 04:52 PM
Error message NSAPI Internal Error Error Code = 100 Kevin @ kwinters54@yahoo.com Windows XP Internet Explorer 0 5th Feb 2004 10:59 PM
Error, Error, Error. JohnMc Windows XP Basics 0 22nd Dec 2003 12:22 AM
A runtime error has occured. Do you want to debug? Line: 1 Error: syntax error Eric Windows XP Networking 0 24th Nov 2003 04:45 PM
IE 6 RunTime error / Line: 335 / Error: Unspecified Error kwloch Windows XP Internet Explorer 0 27th Sep 2003 02:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:57 AM.