Solved

Combobox Lostfocus problem

Posted on 2014-10-06
4
94 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 46

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 46

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 46

Expert Comment

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

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…

840 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