Private Sub Command6_Click()
Dim n, n1 As String
Dim count As Integer
count = Data1.Recordset.RecordCount
txtmax.Text = Data1.Recordset.RecordCount
cnt.Text = 1
n = InputBox("Enter the roll no")
Data1.Recordset.MoveFirst
While Not Data1.Recordset.Fields(1) = n
cnt.Text = cnt.Text + 1
If cnt.Text <= txtmax.Text Then
Data1.Recordset.MoveNext
Else
MsgBox "Record Not Found"
GoTo a:
End If
Wend
Data1.ShowWhatsThis
a:
End Sub
Here's my question.
Actually i am doing a software using vb and MS-Access. I want to search the database for a particular data, say roll no and if that data is present, it should be displayed in the form. But the problem i am having is that, this coding doesn't shows proper result. So i need your guidance in solving this. I hope i will get a right solution here. Thanks in Advance.

Ask A New Question
Reply



MultiQuote





|