Link to home
Start Free TrialLog in
Avatar of stephenlecomptejr
stephenlecomptejrFlag for United States of America

asked on

How do I loop through records highlighted on a datasheet form in Microsoft Access using VBA?

Please note picture below:

How do I loop through only the records that are highlighted on a datasheet form?  I can make a button that can do a messagebox of what the unique identifier is per row but want to loop through only the rows that are highlighted now?   Please provide a snippet of code for me to try!

Thank you in advance.
experts-exchange-highlight-rows.png
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
See the following MSKB article:

How to enumerate selected form records in Access 2003 and in Access 2002
http://support.microsoft.com/kb/294202

Jim.
Avatar of stephenlecomptejr

ASKER

Much appreciation for the snippet of code that worked great!