Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    If statement in macro using Is Null

    This If statement in my macro does not work.

    If [FechaPagada] Is Null Then

    This is in a text box in a form. When I open the form, a pop-up asks to define the part after the If.

    I am trying to change a value depending on whether [FechaPagada] has a value or not.

    Can you help, please?

  2. #2
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,207
    Thanks
    49
    Thanked 989 Times in 919 Posts
    Try testing for a non zero value instead.
    If [FechaPagada] < 1 Then

    cheers, Paul

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts
    Is that the way to test for Null in macros?
    In VBA it is:
    If IsNull([FechaPagada]) Then

  4. #4
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I used another field to test, a yes/no field, and the inmediate if. Testing for a -1 or 0 works.

    Is Pattīs point valid? Did I structure the original statement correctly?

    Thank you all.

Posting Permissions

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