Link to home
Start Free TrialLog in
Avatar of vand
vand

asked on

There isn't enough memory to perform this operation. Close unneeded programs and try the operation again.

Hello everyone, I need help! I have very little Access experiance. One of the Forms designed by a now departed programmer gives us "There isn't enough memory to perform this operation.  Close unneeded programs and try the operation again." Whenever we click on this paticular button. All the other buttons work fine. This is the event procedure:

Option Compare Database   'Use database order for string comparisons

Private Sub Button0_Click()
On Error GoTo Err_Button0_Click

    Dim DocName As String
    Dim LinkCriteria As String

    DocName = "Main"
    DoCmd.OpenForm DocName, , , LinkCriteria

Exit_Button0_Click:
    Exit Sub

Err_Button0_Click:
    MsgBox Error$
    Resume Exit_Button0_Click
   
End Sub

Private Sub Button2_Click()
On Error GoTo Err_Button2_Click


    DoCmd.Close

Exit_Button2_Click:
    Exit Sub

Err_Button2_Click:
    MsgBox Error$
    Resume Exit_Button2_Click
   
End Sub

Private Sub Button4_Click()
On Error GoTo Err_Button4_Click

    Dim DocName As String
    Dim LinkCriteria As String

    DocName = "Reports Form"
    DoCmd.OpenForm DocName, , , LinkCriteria

Exit_Button4_Click:
    Exit Sub

Err_Button4_Click:
    MsgBox Error$
    Resume Exit_Button4_Click
   
End Sub

Private Sub Button5_Click()
On Error GoTo Err_Button5_Click

    Dim DocName As String
    Dim LinkCriteria As String

    DocName = "Table Edit Form"
    DoCmd.OpenForm DocName, , , LinkCriteria

Exit_Button5_Click:
    Exit Sub

Err_Button5_Click:
    MsgBox Error$
    Resume Exit_Button5_Click
   
End Sub

Sub Command7_Click()
On Error GoTo Err_Command7_Click

    Dim stDocName As String

    stDocName = "Short Notice Report"
    DoCmd.OpenReport stDocName, acPreview

Exit_Command7_Click:
    Exit Sub

Err_Command7_Click:
    MsgBox Err.Description
    Resume Exit_Command7_Click
   
End Sub
Sub Command8_Click()
On Error GoTo Err_Command8_Click

    Dim stDocName As String

    stDocName = "Waiting List Report 2"
    DoCmd.OpenReport stDocName, acPreview

Exit_Command8_Click:
    Exit Sub

Err_Command8_Click:
    MsgBox Err.Description
    Resume Exit_Command8_Click
   
End Sub
Sub Command9_Click()
On Error GoTo Err_Command9_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Confirmation Check Form"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command9_Click:
    Exit Sub

Err_Command9_Click:
    MsgBox Err.Description
    Resume Exit_Command9_Click
   
End Sub
Sub Command11_Click()
On Error GoTo Err_Command11_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Completed Main"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command11_Click:
    Exit Sub

Err_Command11_Click:
    MsgBox Err.Description
    Resume Exit_Command11_Click
   
End Sub
Sub Command12_Click()
On Error GoTo Err_Command12_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "IA Main"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command12_Click:
    Exit Sub

Err_Command12_Click:
    MsgBox Err.Description
    Resume Exit_Command12_Click
   
End Sub
Private Sub Command13_Click()
On Error GoTo Err_Command13_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Amy"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command13_Click:
    Exit Sub

Err_Command13_Click:
    MsgBox Err.Description
    Resume Exit_Command13_Click
   
End Sub
Private Sub Command15_Click()
On Error GoTo Err_Command15_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Anita"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command15_Click:
    Exit Sub

Err_Command15_Click:
    MsgBox Err.Description
    Resume Exit_Command15_Click
   
End Sub
Private Sub Command16_Click()
On Error GoTo Err_Command16_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Candy"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command16_Click:
    Exit Sub

Err_Command16_Click:
    MsgBox Err.Description
    Resume Exit_Command16_Click
   
End Sub
Private Sub Command17_Click()
On Error GoTo Err_Command17_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Edie"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command17_Click:
    Exit Sub

Err_Command17_Click:
    MsgBox Err.Description
    Resume Exit_Command17_Click
   
End Sub
Private Sub Command18_Click()
On Error GoTo Err_Command18_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Lucy"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command18_Click:
    Exit Sub

Err_Command18_Click:
    MsgBox Err.Description
    Resume Exit_Command18_Click
   
End Sub
Private Sub Command19_Click()
On Error GoTo Err_Command19_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Natasha"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command19_Click:
    Exit Sub

Err_Command19_Click:
    MsgBox Err.Description
    Resume Exit_Command19_Click
   
End Sub
Private Sub Command20_Click()
On Error GoTo Err_Command20_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Not Yet Assigned"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command20_Click:
    Exit Sub

Err_Command20_Click:
    MsgBox Err.Description
    Resume Exit_Command20_Click
   
End Sub
Private Sub Command21_Click()
On Error GoTo Err_Command21_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Wilson"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command21_Click:
    Exit Sub

Err_Command21_Click:
    MsgBox Err.Description
    Resume Exit_Command21_Click
   
End Sub
Private Sub Command23_Click()
On Error GoTo Err_Command23_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Lela"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command23_Click:
    Exit Sub

Err_Command23_Click:
    MsgBox Err.Description
    Resume Exit_Command23_Click
   
End Sub
Private Sub Command24_Click()
On Error GoTo Err_Command24_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "ADHD Main"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command24_Click:
    Exit Sub

Err_Command24_Click:
    MsgBox Err.Description
    Resume Exit_Command24_Click
   
End Sub
Private Sub Command25_Click()
On Error GoTo Err_Command25_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Case coordinator assignments"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command25_Click:
    Exit Sub

Err_Command25_Click:
    MsgBox Err.Description
    Resume Exit_Command25_Click
   
End Sub
Private Sub Run_Service_Time_Check_Report_Click()
On Error GoTo Err_Run_Service_Time_Check_Report_Click

    Dim stDocName As String

    stDocName = "Service Time Report"
    DoCmd.OpenReport stDocName, acPreview

Exit_Run_Service_Time_Check_Report_Click:
    Exit Sub

Err_Run_Service_Time_Check_Report_Click:
    MsgBox Err.Description
    Resume Exit_Run_Service_Time_Check_Report_Click
   
End Sub
Private Sub Command27_Click()
On Error GoTo Err_Command27_Click

    Dim stDocName As String

    stDocName = "birth to 3 times"
    DoCmd.OpenReport stDocName, acPreview

Exit_Command27_Click:
    Exit Sub

Err_Command27_Click:
    MsgBox Err.Description
    Resume Exit_Command27_Click
   
End Sub
Private Sub Command28_Click()
On Error GoTo Err_Command28_Click

    Dim stDocName As String

    stDocName = "IESC 45 day Report"
    DoCmd.OpenReport stDocName, acNormal

Exit_Command28_Click:
    Exit Sub

Err_Command28_Click:
    MsgBox Err.Description
    Resume Exit_Command28_Click
   
End Sub


Any Ideas? Again, I have no idea how to "read" this so please talk slow and use simple words :)
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Hello vand,

> Whenever we click on this paticular button.

Which button?

Pete
ASKER CERTIFIED SOLUTION
Avatar of Jokra_the_Barbarian
Jokra_the_Barbarian
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Issues that may be causing the error message:

1) You don't explciitly close any recordsets and set them to Nothing, which means that the memory being used may not be being released.
2) You have a graphic on the form, or one that is being dynamically changed regularly - this can eat up stack space very rapidly.
Also ensure that you are up to date with Office and Jet service packs.
Avatar of vand
vand

ASKER

Thank you for the quick responses!

The "button" is on the form that comes up when you launch the mdb. It is called "Startup form" the button is named "referal information" the code that I pasted is what comes up when I go to design view, right click the button and select build event.

How do I determine the record source?

How do I identify the form or report?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
(Default Help Desk response)  Reboot your pc and try again.  Also, when you do this, try not to open a lot of other applications while you are running this particular Access database.

Hope this helps.
-Jim
You can determine the RecordSource for a form or report by opening the object in Design View.  Right-click the small square in the upper-left corner (where the rulers 'join'), and select Properties.  Make sure the combo box at the top of the Properties dialog says "Form" (your title bar should say "Section: Form").  On the "Data" tab, the Record Source should be the very first property.
Well there's nothing called  "referal information" in the code.

In design view, right click the button that gives you the problem and select properties.
Click the Other tab; note the control name.

Click the Event tab.
Click into the On Click property where it says [Event procdure].
Now click the Build button to the right.
You should go into the bit of code relevant to that button as described by Routinet.

You should be able to see the name of the form or report that is being opened.

Close the code window and the form.

In the database window try opening the named form or report by double clicking the name.

Pete
Avatar of vand

ASKER

I have half a Gig of Ram.

The record source is blank for the form.



Avatar of vand

ASKER

JimHorn, rebooting did not help.

BTW all the other "buttons" on this form work.  This problem is universal on multiple PCs.
Avatar of vand

ASKER

There is no "control name" in the properties of the problem button.

The Code from the event procedure is the code I pasted in my original post!

The properties for command button:button0 are:

Under all

Name button0
caption Referral Information
picture none
picture type embedded
transparent no
default no
cancel no
auto repeat no
visible yes
display when always
tab stop
tab indexl
eft
top
width
height

on click event procedure

Avatar of vand

ASKER

OK, when I double click on the form named "Main" I get the same error, also when I try to go into it's design view.
Avatar of vand

ASKER

My "Main" form is corrupt. Replacing with a new copy fixed the issue.
Still not enough info. Do this:
1. View the Startup form in design view.
2. Right click on the "referal information" button.
3. Choose Properties.
4. Click the "Other" tab.
5. The first item should be "Name". What is the value for "Name"? (Should be Command# or Button#)

Avatar of vand

ASKER

Button0