Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 14th, 2008, 12:56 PM
Registered User
 
Join Date: Jan 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update field on all selected records in a subform

Hi Guys

I have a form with a subform and i want the user to be able to select multiple records on it. I need to place a button in the
parent_Form, in order to update a specific field on all selected records. The main problem in the process is that every time we
click the button in the parent_Form the records become unselected, because they loose the focus.

Please can anybody help me?

Thanks in advance
Leopoldo Fernandes from Portugal

 
Old January 14th, 2008, 02:19 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Is it too late to add a check box to the records in the sub form (they only need to be seen in the sub-form)? Then the user can check the check box, and then click the button on the main form. The main form can process all records where Check = Yes, and then reset all the checks in the table to No. So no need to worry about the wrong records still being checked from the previous transaction.

This may be somewhat problematic if this is a multi-user database, but you can process where check = Yes, and another ID field = ??

Worst case you can have the user check the record, and then put a before insert event on the sub form that takes the user's username, and then process all records where check = yes, user = username, and ID = ID.

Did that help at all?


mmcdonal

Look it up at: http://wrox.books24x7.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
selected records from a datagrid kanoorani VB Databases Basics 0 July 11th, 2006 12:20 AM
How to disable subform untill values selected in m method Access 3 June 29th, 2005 07:22 AM
Filter Subform B Based on Field in Subform A SerranoG Access VBA 3 June 18th, 2004 12:23 AM
auto-update multiple records in subform stoneman Access 1 February 8th, 2004 12:19 AM
records in subform stoneman Access 1 October 27th, 2003 11:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.