?
Solved

MsgBox not working in code

Posted on 2006-11-15
4
Medium Priority
?
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 29

Expert Comment

by:Nightman
ID: 17946993
What data type is cmb_yrqtr?
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 17947010
If isnull(cmb_yrqtr ) Then
0
 

Author Comment

by:smoschkau
ID: 17947027
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
ID: 17947039
Thanks angel! That worked GREAT!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

765 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