Jim Dettman
jimdettman at earthlink.net
Sun Jun 13 11:46:09 CDT 2004
Dan,
OnCurrent fires quite a bit as you'll discover for a whole lot of different
reasons. For example, it will fire several times during a delete process as
well. If you have some code in there that you only want to have happen at
specific times and only execute once, you need to protect it with a flag
variable:
In declarations section:
Dim fDoOnCurrentOnce as integer
and in the OnCurrent
If fDoOnCurrentOnce = True then
' Do your processing here
fDoOnCurrentOnce = False
End If
and then in various places, when you want processing to occur:
fDoOnCurrentOnce = True
Jim Dettman
President,
Online Computer Services of WNY, Inc.
(315) 699-3443
jimdettman at earthlink.net
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Dan Waters
Sent: Sunday, June 13, 2004 12:30 PM
To: 'Database Advisors'
Subject: [AccessD] Sub Form Current Event
Hello to everyone on a nice Sunday morning! (at least in Minnesota)
When I move to a different record on a main form, the Current event on a
subform will run twice in succession before the Current event runs in the
main form.
Does anyone know how to cause the subform current event to run only once in
this circumstance?
Thanks!
Dan Waters
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com