|
-
Nov 29th, 2000, 07:43 PM
#18
Thread Starter
Fanatic Member
Sorry for my ignorance on the subject and I appreciate your patience. I am using a listbox. The following code is how I fill it (through a query with parameters that are passed through an input box).
Dim strSql As String
Dim strLName As String
Dim rsdigiID As New ADODB.Recordset
Dim condigiID As New ADODB.Command
lstQuery.Clear
dbConnect
strLName = InputBox("Please enter the Last Name that you would like to search for")
If strLName = "" Then
MsgBox "Please enter a Last Name", vbOKOnly
Exit Sub
End If
strLName = "select * from tbldigidoc where tbldigidoc.L_Name like '" & strLName & "'"
With condigiID
.ActiveConnection = cnndigi
.CommandType = adCmdText
.CommandText = strLName
Set rsdigiID = .Execute()
End With
Do Until rsdigiID.EOF
lstQuery.AddItem rsdigiID("Name_of_Document")
rsdigiID.MoveNext
Loop
rsdigiID.Close
Set rsdigiID = Nothing
Set condigiID = Nothing
What next?, Thanks a lot!
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
|