Rocky Smolin at Beach Access Software
rockysmolin at bchacc.com
Tue Oct 28 22:36:50 CDT 2008
Stuart: Gotta do each one separately since the user may select certain lines from a timesheet to bill and leave others for later. Thanks. Rocky Smolin Beach Access Software 858-259-4334 www.e-z-mrp.com www.bchacc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Tuesday, October 28, 2008 6:13 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Which Is Faster - DAO or db.Execute? I prefer the simplicity of db.Execute - you can do it in a *single* line of code. I suspect that it would be faster in this case, but that's only a "gut feeling". Do you need to do each of the 10-20 detail records separately or can you just put a single "Update..Where" in the Invoice Header or Footer. If you can then it would definitely be quicker since you are only doing a single bulk update rather than opening and closing the table for every detail record. On 28 Oct 2008 at 17:34, Rocky Smolin at Beach Access Software wrote: > Dear List: > > In the detail event of a report, I want to set one of the fields in > the underlying recordset to true. It's an invoicing report and I want > to set the detail record's 'Billed' field to true. The Billed field > is not on the report - just a convenient time to set the flag. > > Would it be faster to use db.Execute "Update...Where " or use DAO > rs.FindFirst. The Where part of the db.Execute and the FindFirst both > use TimeSheetID for the search - a primary key. The table is a linked > table - so no Seek. The number of detail records per invoice is > pretty low - average 10-20. So, not like it's updating a large number > of records. So response time is not an issue. > > I wrote it with DAO - just a few lines of code - because I favor DAO. > So more curiosity for future apps. > > MTIA, > > > > Rocky Smolin > > Beach Access Software > > 858-259-4334 > > www.e-z-mrp.com <http://www.e-z-mrp.com/> > > www.bchacc.com <http://www.bchacc.com/> > > > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com