Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Null statements (2000)

    I swear I've either read this or posted it but I can't find it. I'm having a devil of time with null statements. I'm trying to have a msgbox come up to alert the user if a field is null. No matter how I write it I get a message that states the an object is needed. I've tried

    If me.datepaid is null then
    msgbox...........bla bla bal

    and I've tried

    if is null me.datepaid then
    msgbox.............

    I've even tried taking out the the "is null" and putting in just nul. Nothing works. Sigh....................where am I going wrong this time??

    Thanks,
    Leesha

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Null statements (2000)

    Hi Leesha,

    Use the IsNull function:

    If IsNull(Me.DatePaid) Then
    MsgBox ...
    End If

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Null statements (2000)

    Thanks Hans!!!! I appreciate it!!

    Leesha

Posting Permissions

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