I am using Access 2003 and I am trying to find the max value across
fields,
this is proving to be a very fruitless indevore. I really need some help
here!!
If you got anything...I have tried crosstab queries ... no luck
As Douglas says, you're not finding out how to do this because this
operation should not be necessary in a well-defined database. It
sounds like you're "committing spreadsheet", a venial sin punishable
by being required to read Codd & Date's textbook!
You can do it with just an expression like
=NZ([Field1]) + NZ([Field2]) + NZ([Field3]) <etc>, or... just for
fun... Here's some code that should make it possible:
Public Function SumAcross(ParamArray vValue() As Variant) As Double
Dim iPos As Integer
Dim dblSum As Double
dblSum = 0#
For iPos = 0 To UBound(vValue)
dblSum = dblSum + NZ(vValue(iPos))
Next iPos
SumAcross = dblSum
End Function
You could call this from a Query like
SumIt: SumAcross([Field1], [Field2], [Field3], ...)