|
-
Dec 13th, 2002, 11:59 PM
#1
Thread Starter
Hyperactive Member
'Search Record
I have tried this code to search a record.
Dim aa As String
aa = InputBox("Enter a Employee No.", "Find Employee No.")
DataSet11.Tables("Employee").Rows.Find("empno='" & aa & "'")
But this code doesnt work! In my records, there are Employee No. which is 001.
I typed 001 into the InputBox but it doesn't work.
Any solution do you have. Or Is there another way to Search records in Database using Dataset?
-
Jan 3rd, 2003, 08:21 PM
#2
Addicted Member
hi,
have you already found a solution for this?
marivic
-
Jan 4th, 2003, 10:03 AM
#3
Lively Member
Use Sql
DataAdapter1.SelectCommand.CommandText = & _
"SELECT * FROM Employee WHERE " & _
"ID = ' " & aa & "' " & _
DataAdapter1.Fill(DataSet11)
-
Jan 11th, 2003, 02:34 AM
#4
Addicted Member
Hi,
What I wanted is to be able to scroll the datagrid to position the cursor to the found code. Please tell me how to accomplish this?
Many thanks.
-
Jan 12th, 2003, 09:05 PM
#5
Lively Member
Originally posted by Marivic
Hi,
What I wanted is to be able to scroll the datagrid to position the cursor to the found code. Please tell me how to accomplish this?
Many thanks.
I don't really understand what you meant by "scroll the datagrid to position the cursor to the found code"
-
Jan 12th, 2003, 10:19 PM
#6
Addicted Member
Hi,
I have a datagrid bound to a table. What I wanted is upon inputting the emp code and pressing enter (this is using inputbox), the datagrid would be able to scroll for the cursor to position to where the emp code is located otherwise display 'no record found'.
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
|