i have a table called Members which contain records of all customer.
in a form i fetch records from Members according to user input by Adodc1
then when i click on save button records are saved in different table called FD by Adodc2
if records are not found in Ist table than system gives a message record's are not found
But my probelm is that when again i type a Number( whihc is no in data base)
then my form does'nt show the this message it gave the error " run time error-13 (type mismatch" Note user enter the Customer no. (it is primary key also in Ist table)
My source code is that
Dim M As Integer
M = CInt(Text1.Text) 'user enter the MEMBER_NO WHICH IS INTEGER TYPE
Command8.Enabled = True
Adodc2.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=BCS1;Data Source=DEEPAK-788C85F9"
Adodc2.RecordSource = "select * from Member_list where MS_NO='" & M & "'"
Set Text1.DataSource = Adodc2
Text1.DataField = "MS_NO"
Set Text3.DataSource = Adodc2
Text3.DataField = "M_Name"
Set Text4.DataSource = Adodc2
Text4.DataField = "F_Name"
Set Text13.DataSource = Adodc2
Text13.DataField = "Address"
MADD = Text13.Text
Adodc2.Refresh
Command8.Enabled = False
If Text3.Text = "" Or Text4.Text = "" Then
MsgBox "Record are not found in Database FD can obtained from Society Member's only "
a = a - 1
Command8.Enabled = False
M = 0
Adodc2.Refresh
End If