Solved

Force user to make a combobox selection

Posted on 2014-10-05
1
190 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
[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
1 Comment
 
LVL 34

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

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