Recordset Loops How To

Recordset Loops

I recently answered a question on my Facebook site… Link:-  Full Text of my Answer:- basically it would be best to use a record set loop to solve the OP’s problem.

 I agree with Sherry, you need to use a Recordset Loop… I did a set of video instructions on how to create a Checklist in an MS Access database.

One part of the video covers the record set loop. If you have a look at this video:- 1 – Adding a Checklist to MS Access at this time index:- https://youtu.be/r1y_Zl3uLkM?t=1m12s 

The three videos below are actually three separate time indexes of the same video, time indexes to each place in the video relevant to the question.

The Two Functions

The Two Functions

Video 1 (Time Index 72 to 95)

This Video clip gives you an overview. The video discusses the function on the left, which is something similar to What You Want. Move on through the video to this time index:- https://youtu.be/r1y_Zl3uLkM?t=1m49s 

Video 1 (Time Index 72 to 95)

Nifty Access YouTube Thumb Nail
Play Video

… …

The Function "fCopyListToData"

The Function "fCopyListToData"

Video 2 (Time Index 109 to 150)

In this video clip, I discuss the operation of that function which is generally termed a “Recordset Loop” If you go to the video at this time index https://youtu.be/r1y_Zl3uLkM?t=3m20s 

Video 2 (Time Index 109 to 150)

Nifty Access YouTube Thumb Nail
Play Video

… …

Extracting the Row Information

Extracting the Row Information

Video 3 (Time Index 200 to 250)

That’s the bit you need to change, listSets and listID refer to fields in the record set passed into the record set loop. You need to provide your own SQL statement based on your own tables and then change listSets and listID to the particular fields in the tables from your project you have passed in then check the contents of those variables which represent the fields past in. With regard to deleting a row, off the cuff so to speak without attempting to do it myself, I think I would add an extra field to your table, a boolean field, and write the code to flag the field(s) you want to delete.

Video 3 (Time Index 200 to 250)

Nifty Access YouTube Thumb Nail
Play Video

Complete set of videos along with a download of the sample database are available on my website here:- Add a Check List to your MS Access Database

… …

More Useful Stuff HERE:-

Leave a comment

sixteen − 16 =

This website uses third-party software - WordPress Add-Ins to be exact. I don't know what any individual add-in does, but I'm sure that many of them collect information about you. So be aware, if you continue using this site, then you are likely to be sharing your information. I don't know how to disable this sharing for any, or all of the plugins for individual users. So I can't stop the sharing of information. If this worries you then please do not use this site... If you continue to use this site I will assume that you are happy with it.

Do you need a hand in the right direction?

You are in the right place.