Hello,
I have a problem to use correctly this statement.
I have one table with 2 different fields A and B.
When I open the table, I can see that the table is sorted according A by double clicking on the table under Access.
Then I use the Movefirst statement and display my position by using the msgbox but it does not display the first value of the table. In fact it displays the smallest value of B field. I do not know why but for the program, it is like the table is sorted according B.
Here is the simple code :
If rstTable.RecordCount <> 0 Then
rstTable.MoveFirst
End If
MsgBox rstTable![A]
So I would like to know how to use Movefirst to have the smallest value for the A field.
Thank you very much in advance.
I have a problem to use correctly this statement.
I have one table with 2 different fields A and B.
When I open the table, I can see that the table is sorted according A by double clicking on the table under Access.
Then I use the Movefirst statement and display my position by using the msgbox but it does not display the first value of the table. In fact it displays the smallest value of B field. I do not know why but for the program, it is like the table is sorted according B.
Here is the simple code :
If rstTable.RecordCount <> 0 Then
rstTable.MoveFirst
End If
MsgBox rstTable![A]
So I would like to know how to use Movefirst to have the smallest value for the A field.
Thank you very much in advance.