Solved

MsgBox not working in code

Posted on 2006-11-15
4
232 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 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

691 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