Fireing the event only once (1 Viewer)

Pusher

BEOGRAD Put
Local time
Today, 05:59
Joined
May 25, 2011
Messages
230
Hi all,
I want to fire the event only the first time i on Focus the control. How do i do that? :)
Thaankss
 

speakers_86

Registered User.
Local time
Yesterday, 23:59
Joined
May 17, 2007
Messages
1,919
At the top of the module in the declarations:

Code:
Private i as Boolean

In your code:
Code:
if i=true then exit sub
'Your code here
i=true
 

Pusher

BEOGRAD Put
Local time
Today, 05:59
Joined
May 25, 2011
Messages
230
This does it for the whole form, i want to enter it once in every record...
 

Pusher

BEOGRAD Put
Local time
Today, 05:59
Joined
May 25, 2011
Messages
230
When I go to a record I want this to be entered first time I click on it only. When I go to other record I want also just the first time I enter it. There is a Text that is entered almost every time with adding some other text. I want to help the user so he has only to add or in some cases to delete the text and write something else.
 

vbaInet

AWF VIP
Local time
Today, 04:59
Joined
Jan 22, 2010
Messages
26,374
From what I gather I think the OP wants to fire the code once per record. So if he goes to record 1, it fires, he moves to record 2, it fires, he moves back to record 1, it should not fire. Is this what you're trying to do pusher?

What view is your form in? Datasheet, Single or Continuous?
 

Users who are viewing this thread

Top Bottom