[AccessD] ...gurus only

Dan Waters dwaters at usinternet.com
Fri Nov 2 16:32:10 CDT 2007


Hi William,

I can envision doing this while looping through the recordset.  But what I
would do that's a little different is to not refer to w,x,y, or z, but
rather use the index value of the fields.

So instead of rst("w") use rst(1) (or is it rst(0)??).  If you replace 1
with lngField you can give yourself some control over what the code is
doing.

You'll need to walk through the fields for max like:

Do while lngField<=4
	If lngMax < rst(lngField) then
		lngMax = rst(lngField)
	endif
	lngField = lngField + 1
loop 
rst("Max") = lngMax

Then do something similar for your total fields column.

Hope this helps!
Dan 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Hindman
Sent: Friday, November 02, 2007 1:46 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] ...gurus only

...ok, you too, eh :)

...given:

fields        w        x        y        z        max        series
data1        1        1                            1             2
data2        1                  5                  5             3
data3        1        4                  3        3             4
data4                  2        3                  3             2
data5        1        1        1        1        1             4
data6                  1                            1             1

1) where max is the largest number in w/x/y/z and
2) where series is the total fields between the first one containing a 
number and the last containing a number
3) where empty fields contain "" rather than nulls

...two days and I've yet to come up with an answer to fill the max and 
series fields from the data in w/x/y/z.

...help!

William 


-- 
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