Solved

Force user to make a combobox selection

Posted on 2014-10-05
1
169 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tags from access to excel 3 31
Run Time Error 3075 15 45
MS Access Tables Linking 6 43
How to revise an Access 2003 query into a SQL Server 2008 SQL statement? 1 25
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…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

861 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

24 Experts available now in Live!

Get 1:1 Help Now