Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Coalesce Function - Microsoft Access

RSS
Modified on Wed, Nov 09, 2011, 4:04 PM by Administrator Categorized as Microsoft Office
Public Function Coalesce(ParamArray x() As Variant) As Variant

    Dim i As Long
    Dim iMin As Long
    Dim iMax As Long
    Dim result As Variant
    
    iMin = LBound(x)
    iMax = UBound(x)
    result = Null
    
    For i = iMin To iMax
        If Not IsNull(x(i)) Then
            result = x(i)
            Exit For
        End If
    Next
    
    Coalesce = result
    
End Function

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2018, Patrick Jasinski.