Chuck Grimsby <c.grimsby@worldnet.att.net.invalid> wrote in
news:oqgck1p7ac876t9v9gb56mdvgsvun10bha@4ax.com:
[color=blue]
> On Thu, 06 Oct 2005 20:16:27 -0500, "David W. Fenton"
><dXXXfenton@bway.net.invalid> wrote:
>[color=green]
>>Chuck Grimsby <c.grimsby@worldnet.att.net.invalid> wrote in
>>news:hl6bk1teej0qqsqiuvpduv4ksd0oskt7sg@4ax.co m:[/color]
>[color=green][color=darkred]
>>> Actually, if it's code that's used in more then 1 form, it
>>> should be moved to a module. That way you won't have to also be
>>> concerned if the form is opened or not.[/color][/color]
>[color=green]
>>Well, that all depends on what it does, doesn't it?
>>I've had called OnClick events of command buttons from other forms
>>because the button does something to that particular form that
>>needs to be initiated from the *other* form. Putting the code in a
>>public module makes no sense if the code itself operates only on
>>the form that it is hosted in.[/color]
>
> I can't say as I've ever had that problem myself. If I write code
> that's specific to a form, then it's for that form. If another
> form needs code similar to the code in a form, I re-write the code
> to be more generic and accepts whatever information is needed as a
> series of parameters and default values before moving it to a
> module.[/color]
Well, the point is that you weren't *required* to do that, but chose
to do so.
I've done what Lauren has described as a quick-and-dirty way to get
something working, because it's calling code that I already know
works perfectly well. Re-engineering it to work from elsewhere can
introduce bugs, and just using the existing code in-place has no
such danger.
I've never actually encountered the problem Lauren describes, but I
can't say that I've ever converted one of the apps that does what
she's doing to A2K or higher.
I'm not surprised about this. There are a number of things that were
broken in A2K, especially regarding the connection between forms and
their recordsources and between forms and their modules.
--
David W. Fenton
http://www.bway.net/~dfenton
dfenton at bway dot net
http://www.bway.net/~dfassoc