Re: Help! "Out of Memory" errors with Appointments created from A
- From: "Stuart McCall" <smccall@xxxxxxxxxxxxxxx>
- Date: Tue, 22 Jul 2008 16:43:22 +0100
"Chris O''''Neill" <ChrisONeill@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:323A8CFC-8F51-4B0F-84BE-82CD82177B38@xxxxxxxxxxxxxxxx
No need to hide under a rock. I really do appreciate your suggestions as<snip>
it
helps me learn.
Normally, I place all Dim's at the beginning of a subroutine, and I've
since
done that here too, but at that point I had the Dim's inside the IF/Then
statements so that they wouldn't occur unless the appointment was going to
be
created.
You can't have conditional Dim statements in any flavour of VB or VBA. Even
though you place them inside If Then blocks, the compiler reads them and
allocates memory for the variables in it's first pass through the code, then
it compiles the code in another pass. So just where you place them inside a
procedure is irrelevant. That's why most developers place them at the start
of the procedure. That way they're conveniently grouped together, and you
might as well anyway (for the above reason).
HTH
.
- References:
- Help! "Out of Memory" errors with Appointments created from Acces
- From: Chris O''''Neill
- RE: Help! "Out of Memory" errors with Appointments created from Acces
- From: dch3
- RE: Help! "Out of Memory" errors with Appointments created from A
- From: Chris O''''Neill
- Help! "Out of Memory" errors with Appointments created from Acces
- Prev by Date: Re: Run VBA Code From a Textbox
- Next by Date: RE: Calculation help Please!!!
- Previous by thread: RE: Help! "Out of Memory" errors with Appointments created from A
- Next by thread: Re: Help! "Out of Memory" errors with Appointments created from Acces
- Index(es):
Relevant Pages
|