Computer Learning Zone CLZ Access Excel Word Windows

If a cluttered desk is a sign of a cluttered mind, of what, then, is an empty desk a sign?

-Albert Einstein
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Visitor Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
IsMissing
Brett Jones 

2 years ago
As of the last office update, the IsMissing function has stopped working in my Access VBA code.  Have you heard anything about this?  I've 'google searched' and come up with nothing.  Thanks!
Kevin Robertson  @Reply  
          
2 years ago
Bretton Jones OP  @Reply  

2 years ago
Kevin, I know how to use the function and have been doing so in my database for quite a number of months.  After the last office 365 update came across, the function returns false when it should (and did for said months) return true.  I have changed the functions/subs I have that use it to also test for a zero value or null string - which solves the problem, but I would rather just keep clean code that can rely on proper results from a built-in function.
Kevin Yip  @Reply  
     
2 years ago
IsMissing() only works with a variant argument that has no default value.  Try the code below.  If it returns true, IsMissing is working as it should:

Sub TestSub(Optional v As Variant)
    Debug.Print IsMissing(v)
End Sub

I checked my old code dating back to the '97 days, and all the IsMissing functions were used with variants with no defaults.

None of the following will work with IsMissing:

Sub TestSub(Optional i As Integer)
Sub TestSub(Optional i As Integer = 1)
Sub TestSub(Optional s As String)
Sub TestSub(Optional s As String = "test")
Etc.
Kevin Yip  @Reply  
     
2 years ago
In other words, nothing has been changed to IsMissing as far as I see.
Bretton Jones OP  @Reply  

2 years ago
It was functioning for months with an optional string variable.  As of the last update, not.
Kevin Yip  @Reply  
     
2 years ago
This *2021* documentation says IsMissing only works with variants with no defaults:

     https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/ismissing-function

which says:

"IsMissing does not work on simple data types (such as Integer or Double) because, unlike Variants, they don't have a provision for a 'missing' flag bit."

So either you misremember, or you were misled by something you saw that made you believe so.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Visitor Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/8/2026 7:53:06 PM. PLT: 0s