Solved

Combobox Lostfocus problem

Posted on 2014-10-06
4
103 Views
Last Modified: 2014-10-06
I have a combobox and am using the lostfocus to prompt for saving,but
don't want the lost focus to prompt for saving if the user clicks the save button.
How can this be done ?
0
Comment
Question by:isnoend2001
  • 3
4 Comments
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40363972
If Screen.ActiveControl.Name = "blah" Then
    ' Do something (or don't do something)
End If

Open in new window

0
 
LVL 47

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40363980
In other words.

Private Sub Combo1_LostFocus()
If Screen.ActiveControl.Name <> "Command1" Then
    ' Do save processing
End If
End Sub

Open in new window

0
 

Author Closing Comment

by:isnoend2001
ID: 40363994
Thanks works perfect MartinLiss
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 40364003
You're welcome.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

749 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