Solved

Force user to make a combobox selection

Posted on 2014-10-05
1
161 Views
Last Modified: 2014-10-05
I want to force the user to make a combobox selection before the rest of the code can execute but this isn't working correctly.  The msgbox tells them they have to make a selection but then goes on with the rest of the code anyway.

    If IsNull(Me.cboMemberID) Then
        MsgBox "You must select a member before proceeding."
        Me.cboMemberID.SetFocus
    End If

then the rest of the code ...

Open in new window

0
Comment
Question by:SteveL13
1 Comment
 
LVL 33

Accepted Solution

by:
Norie earned 500 total points
ID: 40362487
I'm not sure where you have placed the code but if you want to stop the code after the If statement being executed try adding Exit Sub before the End If.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
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…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…

762 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

26 Experts available now in Live!

Get 1:1 Help Now