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