Access VBA First Record in Table
One thing that may confuse a lot of programmers, is that the first row of an Access table is NOT necessarily the first record.
For example consider the empty access table below:
Lets say we copy the some data into the table:
In the figure above the data being displayed in the first row of the table is the first record. The data being displayed in the second row is the second record, and so on ….
How does this affect programmers?
If in your program you assume the first row in the table is the first record, your program will run into logical errors.
For example in the figure above the value in the 3rd field of the first row is “Data 11”. The code below displays the value in the 3rd field of the first record:
As you can see the value in the 3rd field of the first record (“Data 1”) is not the same as the value in the 3rd field of the first row of the table (“Data 11”).
For more information about reading data from access tables using VBA please see the link below:
You can download the file and code related to this article from the link below: