Solved

Force user to make a combobox selection

Posted on 2014-10-05
1
172 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
How can you open the FORM2 2 30
Normalization of a table 19 69
ACCESS 2010 - VBA - generic Table Open Button - Code 7 19
backup programme - VBA 3 22
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

815 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

8 Experts available now in Live!

Get 1:1 Help Now