Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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.
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page