Click here to Skip to main content
15,666,726 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
How to make a sample database that can search edit delete and add.

and can be View the data .mdb file in dataviewGrid..

Can anyone Convert this vb6 to vb.net 2010 code

<------------------------------------------------>
VB
If txtsearch.Text = "" Then
MsgBox "Input textbox!", vbInformation, "No Data"
txtsearch.Text = ""
msgError.Caption = ""
Else
    Data1.Refresh
    Data1.RecordSource = "select * from Customer_data where Email_Suffix = '" + txtsearch.Text + "' "
    Data1.Refresh
If Data1.Recordset.RecordCount = 0 Then

 
    Data1.Refresh

MsgBox "No Match!", vbExclamation, "Not found"
msgError.Caption = ""


Else


If txtsearch.Text <> "" Then

msgError.Caption = Data1.Recordset.Fields("Ship_to_Identifier")
MsgBox "Match Found!!!", vbInformation, "Data found"
dbkey.Enabled = True

'Text Box
'txtkey.Enabled = True
'cmdKeyIdentify.Enabled = True

Data1.Refresh
ElseIf Data1.Recordset.RecordCount = 0 Then
MsgBox "Data is lack!", vbExclamation, "Error"
 
Else
msgError.Caption = Data1.Recordset.Fields("Ship_to_Identifier")
 
End If
End If
End If
Posted
Updated 27-Feb-13 0:16am
v3
Comments
Richard C Bishop 19-Feb-13 9:52am    
Those are good terms to ask Google.
Sandeep Mewara 19-Feb-13 10:44am    
Tried anything so far?
ZurdoDev 19-Feb-13 11:14am    
There are a million ways. What do you have so far so we can help?

1 solution

Best way to learn something from scratch is always to read a book about it or contact Mr. "Google.com". To be fair, I appreciate your effort you showed within your question. But we are here in the Q&A section to answer to specific codeing problems including screenshots and code snippets submitted by you.

cheers,
Marco Bertschi
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900