thomasandy
چهارشنبه 01 آذر 1391, 10:46 صبح
با سلام می خواست برنامه بنویسم که کد جستجو دیتا بیس باش مثل کد زیر
Dim Tf As Boolean
Adodc1.Recordset.MoveFirst
Do While Not Adodc1.Recordset.EOF
If Adodc1.Recordset.Fields("tel") = Text4 Then
Text6 = Adodc1.Recordset.Fields("name")
Text5 = Adodc1.Recordset.Fields("family")
Tf = True
Exit Do
Else
Adodc1.Recordset.MoveNext
End If
Loop
If Tf = False Then MsgBox "peyda Nashod"
Dim Tf As Boolean
Adodc1.Recordset.MoveFirst
Do While Not Adodc1.Recordset.EOF
If Adodc1.Recordset.Fields("tel") = Text4 Then
Text6 = Adodc1.Recordset.Fields("name")
Text5 = Adodc1.Recordset.Fields("family")
Tf = True
Exit Do
Else
Adodc1.Recordset.MoveNext
End If
Loop
If Tf = False Then MsgBox "peyda Nashod"