|
-
August 10th, 2001, 03:24 AM
#1
ADO Search Record Function
Can anyone show me the general code for a serch function? Here is the scenario:
In a Product form, it contains Product Name, Unit Price. After a "search" button is clicked and input box will be displayed. This "Search" function is based on "Product Id". after "product Id" is entered, The program will find the corresponding record and display it on the Product form. The database is linked using ADODC. Please let me know how to code this program.
-
August 10th, 2001, 07:14 AM
#2
Re: ADO Search Record Function
The best way to perform sewrch is to use SQL. Enetr your RecordID to the input box and then execute the SQL
Save your input into variable
dProductID if it is a number
sProductID if it is a string
a.Number
sSQL = "select * from YourTable where ProductID = " & dProductID
b.String
sSQL = "select * from YourTable where ProductID = '" & sProductID & "'"
adodc1.DtaSource = sSQL
Iouri Boutchkine
[email protected]
-
August 10th, 2001, 03:07 PM
#3
Re: ADO Search Record Function
adodc1.recordset.find "Product Id='" & productid & "'"
-
August 11th, 2001, 01:16 AM
#4
Re: ADO Search Record Function
So, after performing finding, i wish to know if this recrd exists in my database. What shall i do next?
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
|