Welcome to SPN

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

Sign Up Now!

What's wrong with this VBA ?

Discussion in 'Information Technology' started by Martin \(Martin Lee\), Jul 28, 2006.

Tags:
  1. Martin \(Martin Lee\)

    Martin \(Martin Lee\)
    Expand Collapse
    Guest

    If Forms![ABC].[totalyear] Is Not Null And Forms![ABC].[paidyear] Is Not
    Null Then
    If Forms![ABC].[paidyear] < 3 And Forms![ABC].[regionplace] = "USA" Then
    aiprs6 = "Alert, paidyear too small!!!"
    End If
    Else
    End If

    MsgBox aiprs6, , "AI"


    -----------------------------

    The problem ACCESS msg is "needing object" ( I transfer from Chinese to
    English, thus not sure the exact English is )
     
  2. Loading...

    Similar Threads Forum Date
    General What's wrong with this? Hard Talk Dec 10, 2008
    What's The Exact Meaning Of Sangat.... Questions and Answers Feb 14, 2015
    USA What's the United States Up To in Asia? Breaking News Nov 19, 2011
    What's his name? (Dhadrianwale?) Questions and Answers Jul 31, 2011
    What's the right thing to do? General Jun 12, 2011

  3. Pieter Wijnen

    Pieter Wijnen
    Expand Collapse
    Guest

    Try
    if not IsNull(Forms![ABC].[totalyear]) ...

    HTH

    Pieter

    "Martin (Martin Lee)" <lajitong888@21cn.com> wrote in message
    news:ewQgzDwgGHA.4776@TK2MSFTNGP05.phx.gbl...
    >
    > If Forms![ABC].[totalyear] Is Not Null And Forms![ABC].[paidyear] Is Not
    > Null Then
    > If Forms![ABC].[paidyear] < 3 And Forms![ABC].[regionplace] = "USA"
    > Then
    > aiprs6 = "Alert, paidyear too small!!!"
    > End If
    > Else
    > End If
    >
    > MsgBox aiprs6, , "AI"
    >
    >
    > -----------------------------
    >
    > The problem ACCESS msg is "needing object" ( I transfer from Chinese to
    > English, thus not sure the exact English is )
    >
     
  4. Martin \(Martin Lee\)

    Martin \(Martin Lee\)
    Expand Collapse
    Guest

    You are great! It works!

    However, I wonder why my sentence is not workable, my sentence really seems
    like a workable and "reasonable" VBA :)

    Thanks again!

    Martin Lee


    "Pieter Wijnen"
    <it.isi.llegal.to.send.unsollicited.mail.wijnen.nospam.please@online.replace.with.norway>
    дÈëÏûÏ¢ÐÂÎÅ:O85UKgwgGHA.1324@TK2MSFTNGP04.phx.gbl...
    > Try
    > if not IsNull(Forms![ABC].[totalyear]) ...
    >
    > HTH
    >
    > Pieter
    >
    > "Martin (Martin Lee)" <lajitong888@21cn.com> wrote in message
    > news:ewQgzDwgGHA.4776@TK2MSFTNGP05.phx.gbl...
    >>
    >> If Forms![ABC].[totalyear] Is Not Null And Forms![ABC].[paidyear] Is Not
    >> Null Then
    >> If Forms![ABC].[paidyear] < 3 And Forms![ABC].[regionplace] = "USA"
    >> Then
    >> aiprs6 = "Alert, paidyear too small!!!"
    >> End If
    >> Else
    >> End If
    >>
    >> MsgBox aiprs6, , "AI"
    >>
    >>
    >> -----------------------------
    >>
    >> The problem ACCESS msg is "needing object" ( I transfer from Chinese to
    >> English, thus not sure the exact English is )
    >>

    >
    >
     
  5. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    "Is Not Null" is SQL, not VBA.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "Martin (Martin Lee)" <lajitong888@21cn.com> wrote in message
    news:uLhGfpygGHA.1276@TK2MSFTNGP03.phx.gbl...
    > You are great! It works!
    >
    > However, I wonder why my sentence is not workable, my sentence really

    seems
    > like a workable and "reasonable" VBA :)
    >
    > Thanks again!
    >
    > Martin Lee
    >
    >
    > "Pieter Wijnen"
    >

    <it.isi.llegal.to.send.unsollicited.mail.wijnen.nospam.please@online.replace
    ..with.norway>
    > дÈëÏûÏ¢ÐÂÎÅ:O85UKgwgGHA.1324@TK2MSFTNGP04.phx.gbl...
    > > Try
    > > if not IsNull(Forms![ABC].[totalyear]) ...
    > >
    > > HTH
    > >
    > > Pieter
    > >
    > > "Martin (Martin Lee)" <lajitong888@21cn.com> wrote in message
    > > news:ewQgzDwgGHA.4776@TK2MSFTNGP05.phx.gbl...
    > >>
    > >> If Forms![ABC].[totalyear] Is Not Null And Forms![ABC].[paidyear] Is

    Not
    > >> Null Then
    > >> If Forms![ABC].[paidyear] < 3 And Forms![ABC].[regionplace] = "USA"
    > >> Then
    > >> aiprs6 = "Alert, paidyear too small!!!"
    > >> End If
    > >> Else
    > >> End If
    > >>
    > >> MsgBox aiprs6, , "AI"
    > >>
    > >>
    > >> -----------------------------
    > >>
    > >> The problem ACCESS msg is "needing object" ( I transfer from Chinese to
    > >> English, thus not sure the exact English is )
    > >>

    > >
    > >

    >
    >
     
  6. Martin \(Martin Lee\)

    Martin \(Martin Lee\)
    Expand Collapse
    Guest

    Hi Mr. Steele !

    I remembered not long before, I have made the same mistake. It looks quite
    the same to me. :)


    Martin Lee


    "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> дÈëÏûÏ¢ÐÂÎÅ:e0FDaxygGHA.1272@TK2MSFTNGP03.phx.gbl...
    > "Is Not Null" is SQL, not VBA.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "Martin (Martin Lee)" <lajitong888@21cn.com> wrote in message
    > news:uLhGfpygGHA.1276@TK2MSFTNGP03.phx.gbl...
    >> You are great! It works!
    >>
    >> However, I wonder why my sentence is not workable, my sentence really

    > seems
    >> like a workable and "reasonable" VBA :)
    >>
    >> Thanks again!
    >>
    >> Martin Lee
    >>
    >>
    >> "Pieter Wijnen"
    >>

    > <it.isi.llegal.to.send.unsollicited.mail.wijnen.nospam.please@online.replace
    > .with.norway>
    >> дÈëÏûÏ¢ÐÂÎÅ:O85UKgwgGHA.1324@TK2MSFTNGP04.phx.gbl...
    >> > Try
    >> > if not IsNull(Forms![ABC].[totalyear]) ...
    >> >
    >> > HTH
    >> >
    >> > Pieter
    >> >
    >> > "Martin (Martin Lee)" <lajitong888@21cn.com> wrote in message
    >> > news:ewQgzDwgGHA.4776@TK2MSFTNGP05.phx.gbl...
    >> >>
    >> >> If Forms![ABC].[totalyear] Is Not Null And Forms![ABC].[paidyear] Is

    > Not
    >> >> Null Then
    >> >> If Forms![ABC].[paidyear] < 3 And Forms![ABC].[regionplace] = "USA"
    >> >> Then
    >> >> aiprs6 = "Alert, paidyear too small!!!"
    >> >> End If
    >> >> Else
    >> >> End If
    >> >>
    >> >> MsgBox aiprs6, , "AI"
    >> >>
    >> >>
    >> >> -----------------------------
    >> >>
    >> >> The problem ACCESS msg is "needing object" ( I transfer from Chinese
    >> >> to
    >> >> English, thus not sure the exact English is )
    >> >>
    >> >
    >> >

    >>
    >>

    >
    >
     

Share This Page