Solved

Combobox Lostfocus problem

Posted on 2014-10-06
4
82 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 45

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 45

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 45

Expert Comment

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

757 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

18 Experts available now in Live!

Get 1:1 Help Now