Search and Print the selected record VB6 -




how can print selected record? i'm using visual basic 6. after search record, display in form when click print button records print. want print selected record only.

note : removed code mistake can me new code.

search code :-

con.open "provider=microsoft.jet.oledb.4.0;data source=" & app.path & "\accounts.mdb" rs.cursorlocation = aduseclient rs.open "select * accounts id '" & text1.text & "'", con, adopendynamic, adlockoptimistic     if rs.eof         msgbox "no record found"     else     text2.text = rs!id     text3.text = rs!account     text4.text = replace(replace(replace(rs!name, "*", " "), "%", " "), ",", " ")     text1.setfocus     command2.enabled = true      end if con.close 

insert code :-

dim statement string dim ctl control   con.open "provider=microsoft.jet.oledb.4.0;data source=" & app.path & "\accounts.mdb" rs.cursorlocation = aduseclient      statement = "insert customer_information " & _         "(id, account, name) " & _         " values (" & _         "'" & text1.text & "', " & _         "'" & text2.text & "', " & _         "'" & text3.text & "'" & _         ")"      con.execute statement, , adcmdtext      con.close 





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -