|
-
Jul 29th, 1999, 10:28 PM
#7
Thread Starter
Junior Member
Ok here is my edited code:
List2.Clear
Dim db As Database
Dim rs As Recordset
Dim sSQL As String
Dim currentindex As String
Set db = Workspaces(0).OpenDatabase("c:\inventory2.mdb")
currentindex = List1.Text
sSQL = "SELECT Items.Item FROM " _
& "(Categories INNER JOIN " _
& "[Sub Categories] ON Categories.CatID = " _
& "[Sub Categories].CatID) INNER JOIN " _
& "Items ON [Sub Categories].SubID = " _
& "Items.SubID WHERE (([Sub Categories]. " _
& "[Sub Category]=['" & currentindex & "']))"
Set rs = db.OpenRecordset(sSQL, dbOpenDynaset)
Do Until rs.EOF
List2.AddItem rs!("Item")
rs.MoveNext
Loop
rs.Close
db.Close
This is the error I get:
Type-decleration character does not match declared data type
what am I doing wrong?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|