开发者

Hiding Null Records on Command

My question is fairly straight forward and hopefully simple.

I've got a database that has a long list of part numbers, and some items without part numbers. What i'd like to d开发者_StackOverflowo is have a command button or Radio button that when activated, hides these null records, and when pressed again, shows them once more.

I can give more detail if needed

Thanks for any help!


Here is an example of using the Filter (same as using of out-of-the-box filtering capability from the Access/Office menu):

Setup:

  • Table (e.g. Parts):

Hiding Null Records on Command

  • Form (PartsForm):

Hiding Null Records on Command

Hiding Null Records on Command

Hiding Null Records on Command

  • Event handler for the Checkbox (OnClick):

    Private Sub DisplayAllFilter_Click()
    
    Me.Filter = ""
    
    If Me.DisplayAllFilter.Value = False Then
        Me.Filter = "[PartNumber] is not null"
        Me.FilterOn = True
    Else
        Me.FilterOn = False
    End If
    
    End Sub
    

Result would be something like these:

Hiding Null Records on Command

Hiding Null Records on Command

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜