Solved

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

Posted on 2001-07-23
6
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

689 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