Solved

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

Posted on 2001-07-23
6
277 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

696 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