[AccessD] Do While Syntax

John Bartow john at winhaven.net
Wed Sep 30 19:49:35 CDT 2009


Thanks Jurgen,
Timely advice - I just ran into a null problem! Shouldn't be any but that's
data.

I'll use the field name rather than the bang to help the speed issue. This
is a very slow routine with over 5,000,000 rows in the detail table. And
it's not all normalized data. Basically, a whole lot of data thrown together
from different sources.

Thanks a bunch!
John B

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jurgen Welz
Sent: Wednesday, September 30, 2009 5:46 PM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Do While Syntax


If your variables are strongly typed, you would be wise to use
NZ(rst("FldName"), "") or NZ(rst("FldName"), 0) or whatever makes sense
depending on the type.  Using the bang is slower than using the index or the
field name in quotes.  So far I haven't used the Value property and rely on
the default property being the value but that will likely change.

 

If the field name is "FldName", it doesn't need to stored in a string
variable as suggested by John.  If it is stored in a variable, strFldName,
then his example would be:

 

MyVar = rst(strFldName).Value

 

without the quotes.

Ciao 

Jürgen Welz 

Edmonton, Alberta 

jwelz at hotmail.com


 
> Date: Wed, 30 Sep 2009 07:57:18 -0400
> From: jwcolby at colbyconsulting.com
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Do While Syntax
> 
> There are several variations.
> 
> MyVar = rst("FldName").value
> MyVar = rst!FldName.Value
> MyVar - rst(MyIndex).Value
> 
> The first is used if you have the NAME of the field in a string variable.
> The second is when you know the field name but do not have it stored in a
string variable.
> The third is when you are working through the fields using a numeric
integer as a field collection 
> index.
> 
> John W. Colby
> www.ColbyConsulting.com
 		 	   		  
_________________________________________________________________
Windows Live helps you keep up with all your friends, in one place.
http://go.microsoft.com/?linkid=9660826
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list