?
Solved

MsgBox not working in code

Posted on 2006-11-15
4
Medium Priority
?
237 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
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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses

864 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