Solved

Combobox Lostfocus problem

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2003, my txt file export is running backwards 4 52
Spell Check in VB6 13 114
how to know if my Checkbox is True in VB6.0? 9 57
VBA - If Bookmark = "XXBOOKMARKXX" then 15 29
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

831 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