Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help With IF Statement (A2k (9.0.6926 SP-3))

    This is a meaningless db, just trying to get if statement to work

    In the attached db when frm_CobraMaster_Test opens I can change middle initial from B to X and click Update and will get message that it has changed and give option to change or not, if I click OK it is changed from X back to B (hard coded in form), that is good.

    If I repeat the process and clear the B in middle initial field and click Update I get no message, I want it to get the message as it gave in the above example.

    Any thoughts?

    John

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

    Re: Help With IF Statement (A2k (9.0.6926 SP-3))

    You don't get a message because "B" <> Null doesn't evaluate to True, but to Null. You can use the Nz function to get around this
    <code>
    ...
    Or strMidInitPersonal <> Nz(Me.strMidInit, "") _
    ...
    </code>
    and similar for the other fields.

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help With IF Statement (A2k (9.0.6926 SP-3))

    This has bitten me before and you have bailed me out again

    Thanks John

Posting Permissions

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