Some Fields Do Not Filter in ACCESS 2007

Q

quirkyjoe

I have a large database in ACCESS with varying field types.

For one field, which was created by using this to create the field
value:

STUPIDFIELD: Val(maxoflist( [value1],[value2],[value1],etc)

when I go to the STUPIDFIELD field name in the table I create and
click on the little downward diamond for this field so it will show me
all the values and I can select the ones i want to filter, it does NOT
show me all the values like what happens when I click on all the other
fields.

How can I fix this? It is annoying when I am QAing my table.

The maxoflist function I use is below.

Thanks.

Function MaxOfList(ParamArray varValues()) As Variant
Dim i As Integer 'Loop controller.
Dim varMax As Variant 'Largest value found so far.

varMax = Null 'Initialize to null

For i = LBound(varValues) To UBound(varValues)
If IsNumeric(varValues(i)) Or IsDate(varValues(i)) Then
If varMax >= varValues(i) Then
'do nothing
Else
varMax = varValues(i)
End If
End If
Next

MaxOfList = varMax
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top