Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8980161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:00:39+00:00 2026-06-15T20:00:39+00:00

So I have a frustratingly simple issue that I cannot seem to solve. If

  • 0

So I have a frustratingly simple issue that I cannot seem to solve.

If Me.Bank_Credit.Value = Null Then
Me.Bank_Credit.Value = 0
End If

Basically, I have an unbound box that the user enters data into and then hits a button. After a YES on confirmation box, the data on the unbound box is copied over to the bound box. However, if the user does not enter anything, that in turn creates an empty bound field which can seriously screw up queries down the road.

That being said, the above code simply will not work for me. If I set, for instance, If Me.Bank_Credit.Value = 1 and then run it, the 1s get turned into 2s, as should happen. But it simply refuses to work for Null or even “”.

I’m so sure there is a simple solution to this issue, I just can’t figure it out.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:00:41+00:00Added an answer on June 15, 2026 at 8:00 pm

    Nothing is ever equal to Null, not even another Null. And nothing is ever not equal to Null, not even another Null.

    When Bank_Credit is Null, the following expression will return Null … not True as you might expect, or even False.

    Debug.Print (Me.Bank_Credit.Value = Null)
    

    It’s the same reason for this result in the Immediate window:

    Debug.Print Null = Null
    Null
    

    Use the IsNull() function.

    If IsNull(Me.Bank_Credit.Value) Then
    

    Also, look at the Nz() help topic to see whether it can be useful. You could do this, although it’s not really an improvement over IsNull(). But Nz() can be very convenient for other VBA code.

    Me.Bank_Credit = Nz(Me.Bank_Credit, 0)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple little code fragment that is frustrating me: HashSet<long> groupUIDs =
I have found out that I am doing WPF wrong and frustratingly must overhaul
I have a really frustrating issue where I cannot retrieve any of the headers.
I have a really frustrating error that I've spent hours looking at and cannot
I seem to have a problem with my very simple implementation of a file
I've been struggling for the past day to solve a very simple (but frustratingly
I am having this issue and I am hoping that it is so simple
I'm facing a frustrating issue. I have an application where the scroll wheel doesn't
I have simple WCF Service Application (based on this tutorial : Getting Started ).
this is killing me but is there any simple way to have objective-c code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.