Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Null expression???

Discussion in 'Information Technology' started by MartinR, Jul 28, 2006.

  1. MartinR

    MartinR
    Expand Collapse
    Guest

    I want to write an IF statment that will make a obj control box appear
    only if there exists a picture for that record. Ie i want to know what
    Null expression i can use to distinguish if the picture exists or not.
    At the moment, this is the code i am using, but i am getting run time
    error '424'....object required .....when i go to run it.

    If Me![Picture3] Is Null Then
    Me![Picture3].Visible = False
    Else
    Me![Picture3].Visible = True
    End If


    The first line of code is where the error is.

    Can someone throw some light on my problem,
    Thanks
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Sikh woman's forced marriage annulled in Britain (New Kerala) Breaking News Oct 22, 2008
    Sikh News Sikh woman’s marriage annulled in UK (Hindustan Times) Breaking News Oct 22, 2008
    Concept Of Sunn-Void,nullity, Essays on Sikhism Jan 16, 2008
    Cultural Appropriation And Expressions Of Sikhi Convert's Corner Dec 28, 2015
    Canada On Sikh separatism, Harper in India defends freedom of expression Breaking News Nov 8, 2012

  3. Brendan Reynolds

    Brendan Reynolds
    Expand Collapse
    Guest

    "Is Null" is SQL syntax, as used in queries, in VBA code you need to use the
    IsNull() function instead to test for Null values ...

    If IsNull(Me!Picture3) Then

    If that doesn't work for you, could you clarify what type of control is
    'Picture3'?

    --
    Brendan Reynolds
    Access MVP

    "MartinR" <martin.ryan@esbi.ie> wrote in message
    news:1152779913.336619.274890@m73g2000cwd.googlegroups.com...
    >I want to write an IF statment that will make a obj control box appear
    > only if there exists a picture for that record. Ie i want to know what
    > Null expression i can use to distinguish if the picture exists or not.
    > At the moment, this is the code i am using, but i am getting run time
    > error '424'....object required .....when i go to run it.
    >
    > If Me![Picture3] Is Null Then
    > Me![Picture3].Visible = False
    > Else
    > Me![Picture3].Visible = True
    > End If
    >
    >
    > The first line of code is where the error is.
    >
    > Can someone throw some light on my problem,
    > Thanks
    >
     
  4. MartinR

    MartinR
    Expand Collapse
    Guest

    That worked perfect, thank you very much.
     

Share This Page