|
-
Apr 8th, 2003, 04:03 PM
#1
Thread Starter
Addicted Member
How do I make a record search in Access VB? Not VB6...
Here is what I do for VB but how would I write this if I was puting this in a button in Access itself?
Set CN = New ADODB.Connection
CN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " & App.Path & "\Database\Database.mdb"
Set SetConnection = CN
ConnectVar = True
strSearchFor = List1.Text
Do while rsPriceList Not EOF
Set rsPriceList = New ADODB.Recordset
rsPriceList.Open "SELECT * FROM PriceList WHERE PriceID = " & strSearchFor & "", CN, , adLockOptimistic
rsPriceList.Fields("Name").Value = NameTxt.Text
rsPriceList.next
loop
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
|