The path d: \ 1. MDB table name CHSJ first column name in the second column chyy
Vb text1 input data query. Look for in the MDB name column is equal to the value corresponding to the text1 chyy the save to text2.
CodePudding user response:
The building Lord find routines can. Take a look at a littleBasically copied, altered database, table, the name of the field
CodePudding user response:
'reference Microsoft ActiveX Data Objects Library 2.8Dim cn As ADSODB. Connection, rs As the ADODB library you
Set the cn=New ADSODB. Connection
Cn. The Open ". The Provider=Microsoft Jet. The OLEDB. 4.0; The Data Source=d: \ 1. MDB
"Set the rs=cn. Execute (" SELECT chyy FROM CHSJ WHERE [name]='" & amp; Text1 & amp; "'")
If Not rs. EOF Then Text2=rs! Chyy & amp; "
"
Rs. Close
Set the rs=Nothing
Cn. Close
The Set cn=Nothing