Hi guys,

I was wondering if someone could help me?! I am doing a uni project where we have to access and query a MA database. At the moment I have the database accessed and query is working but I'm having some problems displaying the records - I can scroll through all of the records using the Next, Previous, First and Last buttons but when I put in a query it only shows the queried results in the text boxes used - so it still makes you scroll through all the other records (but they are shown as blank) and will only display the query results. (so if there are 2 results to show and are at the bottom of a table then then you have to click next through blank records until you get to the results)

Hope someone can point me in the right direction - I think its I have to set the rowPosition to 0 in the query but nothing I have tried is working - below is the code for my next button:

Private Sub btnMoveNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMoveNext.Click

If m_rowPosition < (m_dtnewResults.Rows.Count - 1) Then
m_rowPosition = m_rowPosition + 1
Me.ShowCurrentRecord()
End If

End Sub

Here is where I declared the row Position:

Private m_rowPosition As Integer = 0

Hope someone can help me or point me in the right direction!!

its alright - simple and stupid error on my part! sorry!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.