|
-
Aug 29th, 2002, 02:06 AM
#1
Thread Starter
Lively Member
DB - Array - Listbox - Field.Caption
Hi Have the following code in a Function...
Dim db As Database
Dim rs As Recordset
Dim SQLString As String
Dim ArtType As String
Set db = OpenDatabase("bla.mdb")
SQLString = "SELECT Product.Type, Products.Number, Products.Description, Products.City, Products.Author From Products WHERE ((Products.Type) = '" & ArtType & "');"
Set rs = db.OpenRecordset(SQLString)
If rs.BOF = True And rs.EOF = True Then
MsgBox Error
rs.Close
db.Close
End if
I want rs.Fields("Type"), rs.Fields("Number"), rs.Fields("Description"), rs.Fields("City"), rs.Fields("Author") to be loaded into an array...
I want rs.Fields("Type") to be added into a Listbox with the number of the array...Whenever I click on one of the items in the listbox...I want to see thee rs.Fields("Number"), description, city en author in 4 labels..with Label.Caption...
Can anyone help?
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
|