Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    83

    Unanswered: Simple Access Filter...should be anyway

    I've got a form thats needs filtering (VBA in Access), so I created about 5 textboxes to filter various fields. I'm running into 2 small problems...

    1) How can I check to make sure there is no text in the box first. I was thinking of an If/ElseIf, but I have no idea how to check is the box is empty. I've tried every combo I can think of checking for null, but I usually get a "type" error.

    2) I need to filter the text based on wildcards (Like '*Paul*'), but those don't seem to be working either

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Simple Access Filter...should be anyway

    Originally posted by High_D
    I've got a form thats needs filtering (VBA in Access), so I created about 5 textboxes to filter various fields. I'm running into a small problem...

    How can I check to make sure there is no text in the box first. I was thinking of an If/ElseIf, but I have no idea how to check is the box is empty. I've tried every combo I can think of checking for null, but I usually get a "type" error.
    MyTextbox.Value

    -or-

    just MyTextbox if the textbox control has the focus ...

  3. #3
    Join Date
    Feb 2004
    Posts
    142
    isnull(ControlName) will return true or false
    KC

  4. #4
    Join Date
    Mar 2004
    Posts
    83
    Prefect, works great guys thanks.

    Howabout wildcards in filters, is that just a pipe dream?

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Originally posted by High_D
    Prefect, works great guys thanks.

    Howabout wildcards in filters, is that just a pipe dream?
    Not at all:


    "LIKE '*" & MyTextbox.Value & "*'"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •