[AccessD] Editing Records

Bob Gajewski bob at renaissancesiding.com
Wed Mar 5 13:51:00 CST 2003


Andy

Just shooting from the hip, but couldn't that be done using a loop?

Seems like it might be a lot of coding, even for just 13 validations ... and then it would handle more if they were added later.

Regards,
Bob Gajewski

On Wednesday, March 05, 2003 14:22 PM, Andy Lacey [SMTP:andy at minstersystems.co.uk] wrote:
> Tim
> Just a suggestion 
>  
> Dim blnNeedsUpdate As Boolean
>  
> 
> blnNeedsUpdate =False
> 
> If validation1 = false then 
>         blnNeedsUpdate =True
> 
> End if 
> 
> If validation2 = false then 
>         blnNeedsUpdate =True
> 
> End if 
> 
> 
> etc
> 
> if blnNeedsUpdate = true
> 
> ..edit
> 
> change all fields
> 
> ..update
> 
>  
> 
> Andy Lacey
> http://www.minstersystems.co.uk <http://www.minstersystems.co.uk/> 
> 
> 
> 
> -----Original Message-----
> From: accessd-admin at databaseadvisors.com
> [mailto:accessd-admin at databaseadvisors.com] On Behalf Of Swisher,
> Timothy B 
> Sent: 05 March 2003 13:06
> To: accessd at databaseadvisors.com
> Subject: [AccessD] Editing Records
> 
> 
> 
> Hello group, I have a procedure (A2k) that opens a recordset (DAO) and
> cycles through the data validating/updating several fields for each
> record.  My question is, what is the best way to do this, 
> 
> Like this 
> 
> ..edit 
> If validation1 = false then 
>         change data 
> End if 
> 
> If validation2 = false then 
>         change data 
> End if 
> ..update 
> 
> Or  
> 
> If validation1 = false then 
>         .edit 
>         change data 
>         .update 
> End if 
> 
> If validation2 = false then 
>         .edit 
>         change data 
>         .update 
> End if 
> 
> I have about 13 validations that need to be done on about 90,000
> records.  Each validation goes to a SQL Server BE and check the validity
> of the data.  There is a huge difference in speed opening and closing
> the recordset so many times, but if that is the better way to go, then
> so be it.  All help is appreciated.  TIA 
> 
> Tim 
> 
>  << File: ATT00006.htm >> 




More information about the AccessD mailing list