Solved

process filtered records

Posted on 2011-09-12
3
254 Views
Last Modified: 2012-05-12
I need to create a mechanism that allows users to filter on a database and then write some code to process the filtered records.

Ideally I want to create a form that allows me to put some instructions, a "Select All" button and a Process records button in the header. Let's say I call that frmMain. That's easy.

Then I would like to use a subform in datasheet view so that the user can use the standard MS Access filters to display the records they want to process. Let's say I call that sfrmData. I can build that.

Once they have displayed those records I want the user to be able to select which of those records they want processed by checking the check box alongside each or by pressing the Select All button on the form. NB Each record has a field called Select, set to false when the form is first activated. That is the record I need ticked to indicate that it's a record to be processed. It's the Select All process that I don't know how to do.

Finally I want them to press the Process Records button to process the selected records. I can do that by looping through the dataset that by now has Select = True for all the records to be processed.

It's the second last step that I need help with. Is there any way I can use a Loop through only the displayed records records on a subform from a routine in the main form and set Select = True? If so, how?
0
Comment
Question by:Rob4077
  • 2
3 Comments
 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 500 total points
ID: 36521199
What version of Access?

I will assume 2007. See if this example helps: Batch Printing and Save As PDF
0
 

Author Comment

by:Rob4077
ID: 36521203
Figured it out. I just made the recordset of the main form the same as my subform and then processed the records on the main form which then flowed through to the subform

Will wait a few minutes in case someone has already started an answer but otherwise will close question
0
 

Author Comment

by:Rob4077
ID: 36521206
Hi TheHiTechCoach, your reply must have come through as I was typing mine. Looks like a good workable solution. Thank you!!!
Rob
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question