Solved

MsgBox not working in code

Posted on 2006-11-15
4
226 Views
Last Modified: 2010-04-30
If cmb_yrqtr = Null Then
MsgBox "You must select a year/qtr", vbExclamation, "Sorry!"


Else
DoCmd.OpenQuery "Mtbl_AllIndicatorfilter", acViewNormal, acEdit


When I put a break on the line 'If cmb_yrqtr = Null Then'  i can see that 'cmb_yrqtr' = Null-
so why isn't my msgbox popping up?

0
Comment
Question by:smoschkau
  • 2
4 Comments
 
LVL 29

Expert Comment

by:Nightman
Comment Utility
What data type is cmb_yrqtr?
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
If isnull(cmb_yrqtr ) Then
0
 

Author Comment

by:smoschkau
Comment Utility
I think numeric??

In the colum I have -1 and 2005_3

The combo box comes from a union query-
0
 

Author Comment

by:smoschkau
Comment Utility
Thanks angel! That worked GREAT!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now