Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002

    Unanswered: Isn't "null" or ""

    I have a small form that is based off a query. I want a button to become visible or invisible if a textbox is blank or not blank. The form is based off a query and the one textbox is the data field on the form. I have tried a if then statement referring to the box as "null" and "", but either don't work when the textbox is actually empty. Is there a command or something that I can refer to as "no data" ? Or is there another solution. I've even tried the isnull([textbox]) but it doesn't work either.

  2. #2
    Join Date
    Mar 2002
    Sacramento, CA
    Maybe if you can clarify a couple of things.

    At what point do you want the button to appear/disappear?

    1 - When the form opens and the textbox is empty? (This will occur if your db opens to a "new" record.
    2 - When you go to a new record?
    3 - When your form loses focus to another form?

    I cannot picture what you are trying to do.

    Give us a bit more info to chew on !!


  3. #3
    Join Date
    Nov 2002

    I have run into this problem a few times. First of all, what your expression looks like depends on the data type:

    if VAR = "" Then
    if VAR = Null Then
    if VAR = empty
    And quite possibly the most frustrating
    if Isnull (VAR) then

    Without knowing a little more about your specific problem, my suggestion is to try each of the above and put a break where the if statement is. This will allow you to determine the "best'" syntax.

Posting Permissions

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