Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Out of Memory (A2k (9.0.4402) SR-1)

    Out of Memory

    A2k (9.0.4402) SR-1

    All of a sudden when viewing code in a form I get

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Out of Memory (A2k (9.0.4402) SR-1)

    This is usually cause by "leaky" code. Go through your code and make sure you don't have any object variables that aren't being destroyed. Then also check to make sure you aren't using code like "If Me!CheckBox Then". If you are, put the control reference is parens to let Access know you want to evaluate the value of that control or use an explicit Me!Checkbox = True construction.
    Charlotte

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Out of Memory (A2k (9.0.4402) SR-1)

    Hi Charlotte

    You wrote
    This is usually cause by "leaky" code. Go through your code and make sure you don't have any object variables that aren't being destroyed.

    do you mean like this? Set Db = Nothing

    You wrote
    Then also check to make sure you aren't using code like "If Me!CheckBox Then". If you are, put the control reference is parens to let Access know you want to evaluate the value of that control or use an explicit Me!Checkbox = True construction.

    How do I put control ref in parens?

    Any other housekeeping things I can do to prevent leaky code?

    Thnak, John

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Out of Memory (A2k (9.0.4402) SR-1)

    Yes, set the objects to Nothing. What I meant by the other is to do one of two things:

    If (Me!CheckBox) Then

    or

    If Me!CheckBox = True Then

    Both serve the same purpose. The first one forces Access to evaluate the value of the CheckBox, while the second completes the implied equation. Of the two, the second is more self-documenting.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •