Repeat same action, but for different row.

in2ition

New Member
Joined
Mar 27, 2013
Messages
2
Hello everyone,

I have an Access Form called Database_Form, with a text box called Text22, and a button called Command42.

I also have a table, and query, as following:

Table 1, as in the below example:
Row_NumberColumn2Column3
Column4
Column5
Column6
1002600710101001*2101
2002600710101002*2101
3002600710201001*2201
4002600710201002*2201
5002600710202001*2203

<caption>
</caption> <thead>
</thead> <tbody>
</tbody> <tfoot></tfoot>


Query 2, which has the criteria [Forms]![Database_Form]![Text22] for Row_Number Field.

Basically, i want that each time when i press the button Command42 and having the text box filled with value 1 (for row number 1), to repeat this step, but taking the next row_number and so on, until it finishes the last row.

The Query 2, should sequentially select the row number given in the text box, based on a VBA Code or something.

Is there any VBA code in order to achieve this ?

Thank you.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi,
If row number is a field in the database then you would only need to select the records in sorted order and use the standard navigation feature in Access. Each time you move forward one record it will be the next row number. As a general rule, database theory is not dependent on the ordering of rows. But a sequential numbering of records such as the one you have will allow you to move through the records in order.
ξ
 
Upvote 0

Forum statistics

Threads
1,206,945
Messages
6,075,780
Members
446,156
Latest member
Aaro23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top