Stuart McLachlan
stuart at lexacorp.com.pg
Tue Oct 28 20:12:56 CDT 2008
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