• Procedure using Null

    Author
    Topic
    #480197

    I am using a Access 97 DB converted to 2010 The procedure functions in the first option, but the second option functions like it returns 1, rather than Null. Is the syntex correct for this?

    Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer)
    ‘ Set the option group value to match user’s filtering action.

    If ApplyType = acShowAllRecords Then
    FilterOptions = 1 ‘ Set the All Contacts option value.
    ElseIf Filter “City = ‘New York'” Then
    FilterOptions = Null ‘ Don’t set any option value.
    End If

    End Sub

    Viewing 1 reply thread
    Author
    Replies
    • #1308242

      So FilterOptions is the name of an Option Group on your form. I don’t know why setting its value to Null does not work. Try setting it to 0 instead. Assuming 0 does not correspond to one of the options that makes it so none of the options are chosen.

    • #1308289

      The 0 works. Thanks. Strange things do happen. I appreciate the help.

    Viewing 1 reply thread
    Reply To: Procedure using Null

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: