Solved

Why the lost focus function for the form doesn't work?

Posted on 2001-07-23
6
273 Views
Last Modified: 2012-06-27
i write the lost focus function for a form. but it doesn't work at all, when i switch to other form (lost focus of the form), it doesn't run the commands in private sub form_lostfocus()

does anybody know why?
0
Comment
Question by:ppingshi
6 Comments
 
LVL 12

Accepted Solution

by:
Paurths earned 50 total points
ID: 6307854
hi ppingshi

try the  onDeactivate-event of the form...

Private Sub Form_Deactivate()
    MsgBox Me.Name & " wordt gedeactiveerd"
End Sub

cheers
Ricky
0
 
LVL 12

Expert Comment

by:Paurths
ID: 6307861
might be better in english...

Private Sub Form_Deactivate()
   MsgBox Me.Name & " is being deactivated..."
End Sub
0
 
LVL 12

Expert Comment

by:Paurths
ID: 6307879
btw, a form can only receive focus when there are no controls (objects) on the form, or when all visible controls on it are disabled.
Thus, if u click a button to go to another form, the actual form will not lose focus, since it did not have the focus. (So no LostFocus event is triggered)

hope this clears things up,

cheers
Ricky
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 54

Expert Comment

by:nico5038
ID: 6307934
The pop-up type of form doesn't work properly on the events, perhaps that's the case with your form?

Nic;o)
0
 

Expert Comment

by:amp072397
ID: 6783995
ppingshi:

Just a friendly reminder to stay active in your question.

thanks!
amp
community support moderator

7/26
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6958281
Per recommendation, force-accepted by
Netminder
CS Moderator
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

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server views 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 Access…
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…

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

21 Experts available now in Live!

Get 1:1 Help Now