Search code examples
ms-accessvbaoffice365copy-paste

Count marked/selected records/rows in access table


I need an option where I can select a range of records or rows in an access table or access query (see this screenshot) and then have something to tell me how many records I have actually selected.

When working with copy & paste, this is a very helpful feature, if you work with big data tables. I have searched long and hard but no-one seems to be providing a solution by manually selecting with your cursor.

Does anyone know any solution to this? (maybe implementing a vba macro?)


A little bit of background information:

My co-worker used to work with an excel file and got very used to the functionalities of excel. As time went on the excel file became bigger and bigger - by now it takes approximately two minutes to start up the excel file.

He hit me up and asked me if I knew a clever solution for him - so I thought MS Access would be the perfect software for him.

Since he's going to work with copy & paste it's necessary to know how many records he has copied - so that he knows how many records he needs to select to paste the copied records (access isn't as flexible as excel when it comes to using copy & paste).


Solution

  • The Form property SelHeight returns the count of selected records.