Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    jazzy is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    77

    On Click: There isn't enough memory to perform this operation.

    The expression On Click you entered as the event property setting produced the following error: There isn't enough memory to perform this operation. Close.....


    This was working fine for months, now all of a sudden SOME people are getting this when they click the button to open a report (see below), others working fine. i have an accde files on all the users systems connecting to an Azure SQL database. if i put an accdb file on a users computer that is having the issue and i start the database with holding shift, it will work fine. If it opens either the accde or the accdb auto start they both fail, again only on certain systems. can t figure it out. working fine on my machine so cant duplicate the error. thanks in advance. Access 2019 (Office 365). my searches say MaxLocks per file on records but the database is really not that big.

    Code:
    Private Sub OpenDepositInvoice_Click()If IsNull([subfrm_Invoice].[Form]![InvoiceCreatedDate]) And [subfrm_Invoice].[Form]![Description] <> "Final Balance" Then
        [subfrm_Invoice].[Form]![InvoiceCreatedDate] = Date
    End If
    
    
    If [subfrm_Invoice].[Form]![Description] = "Final Balance" Or [subfrm_Invoice].[Form]![Description] = "MaitreD Fee" Then
    MsgBox "Report for Deposits Only"
    Else
    DoCmd.OpenReport "rpt_InvoiceDeposits", acViewReport
    End If
    
    
    End Sub

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Check the affected machines aren't halfway through an Office update and need a reboot.
    I've had odd things happen when an update hasn't fully completed.

    Why do you need to hold the shift key down on a full version of the file? That seems a little strange.
    Do you get the same problem if you don't hold the shift key down?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    jazzy is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    77
    shift just stops the autoexec etc.. from running. did that to isolate the line in VB (DoCmd.OpenReport "rpt_InvoiceDeposits", acViewReport). rebooted computers, repaired office, same. looked at MaxLocksPerFile but coudlnt find the registry entry on a computer running Access Runtime. did the MaxLocksPerFile value from 9500 to 15000 on computer with full version of access and still same error.

  4. #4
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Some reference links for you:
    https://learn.microsoft.com/en-US/of...count-exceeded (look at method 2 to do it in VBA in the AutoExec macro)
    https://www.access-programmers.co.uk...ceeded.316269/
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #5
    jazzy is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    77
    Quote Originally Posted by Gicu View Post
    Some reference links for you:
    https://learn.microsoft.com/en-US/of...count-exceeded (look at method 2 to do it in VBA in the AutoExec macro)
    https://www.access-programmers.co.uk...ceeded.316269/
    Cheers,
    made the registry change, its not the MaxLocksPerFile. thanks anyways

  6. #6
    jazzy is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    77
    just confirmed it again. when i put the accdb file on a machine that is getting the error and hold shift on startup the error doesnt occur. it appears it is with the autoexec or something that causes it. the machines that have the runtimes i cannot do that. this error came out of no where.

  7. #7
    jazzy is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    77
    upgraded from access version 2016 to office 365 issue not happening on one of the machines anymore. will try others

  8. #8
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    What do you have in the AutoExec?

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  9. #9
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  10. #10
    jazzy is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    77
    Quote Originally Posted by Gicu View Post
    What do you have in the AutoExec? but like i said it has been running fine for ahwile. when i run the LinkTable manually when i run access holding down shift, it works fine.... i think its something screwy with Access 2016 to be honest, that just started happening.


    Cheers,
    Macro Runs this
    Code:
    Public Function LinkTables()
    
        On Error Resume Next
        Dim tblDef As DAO.TableDef
        Dim Msg, Style, Response
        Msg = "Do you want to re-Link the Tables?"
        Style = vbYesNo + vbCritical + vbDefaultButton2
        Response = MsgBox(Msg, Style)
    If Response = vbYes Then
        For Each tblDef In CurrentDb.TableDefs
            If tblDef.Connect <> "" Then
                tblDef.Connect = DLookup("ODBCPath", "tbl_SystemInfo", "SystemInfoID= 1")
                Status ("Linking Table " & tblDef.Name)
                tblDef.RefreshLink
            End If
                Status ("")
        Next
    Else
        Exit Function
    End If
                 
    End Function
    Sub Status(pstrStatus As String)
        
        Dim lvarStatus As Variant
        
        If pstrStatus = "" Then
            lvarStatus = SysCmd(acSysCmdClearStatus)
        Else
            lvarStatus = SysCmd(acSysCmdSetStatus, pstrStatus)
        End If
        
    End Sub

  11. #11
    jazzy is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    77
    upgrading to latest runtime (Office 365) does not correct the issue. i think the only way to correct it is to upgrade to the full blown version of Access in (office 365)

  12. #12
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    In the code posted in your original post - is the subform subfrm_Invoice bound? Does the error occur regardless if the InvoiceCreateDate is populated or not? You are not saving the subform after you populate the date; is the report's recordsource using that date field? What happens if you comment out the OpenReport line and replace it with a Docmd.OpenQuery qryReportRecordSource?

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  13. #13
    jazzy is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    77
    subform subfrm_Invoice Data-Record Source
    Code:
    SELECT tbl_Invoice.InvoiceID, tbl_Invoice.ContractsID, tbl_Invoice.InvoiceDate, tbl_Invoice.AmountDue, tbl_Invoice.Description, tbl_Invoice.InvoiceCreatedDate FROM tbl_Invoice;
    The report isnt based on a query it is filled with fields pulling data from an open form. i have a system that has office 365 Access installed, same error. BUT if i open it with holding shift it works fine. changed name of AutoExec (didnt run) still same issue.

    Hold Shift, manually run AutoExec no errors.

  14. #14
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Very strange because if the AutoExec is just refreshing the links it shouldn't have any impact on this. I assume the report is based on the form that has the button from post #1, can you try this updated code:
    Code:
    Private Sub OpenDepositInvoice_Click()
    If IsNull(Me.subfrm_Invoice.Form.InvoiceCreatedDate) And Me.subfrm_Invoice.Form.Description <> "Final Balance" Then
        Me.subfrm_Invoice.Form.InvoiceCreatedDate = Date
    	Me.subfrm_Invoice.Form.Dirty=False 'save the subform
    End If
    
    
    If Me.subfrm_Invoice.Form.Description = "Final Balance" Or Me.subfrm_Invoice.Form.Description = "MaitreD Fee" Then
    	MsgBox "Report for Deposits Only"
    Else
    	DoCmd.OpenReport "rpt_InvoiceDeposits", acViewPreview    'acViewReport
    End If
    End Sub
    If you still get the error (compile it first and make sure it does) then I suggest you try to base the report on a query or a temp table (by running a make table just before the OpenReport).

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  15. #15
    jazzy is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Nov 2021
    Posts
    77
    will try and let you know, as always thank you. just strange that it just started happening without any changes and only on certain machines, was working fine for months.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-18-2016, 10:23 AM
  2. Not enough Memory to Perform Operation.
    By khughes46 in forum Access
    Replies: 6
    Last Post: 06-01-2015, 01:46 PM
  3. Replies: 5
    Last Post: 07-03-2014, 06:59 PM
  4. Replies: 16
    Last Post: 04-17-2014, 04:45 PM
  5. Replies: 0
    Last Post: 11-29-2011, 01:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums