Error 2057 - Not enough stack memory left to perform this operation

psycoperl

Active Member
Joined
Oct 23, 2007
Messages
339
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
  3. Web
I am getting a 2057 - Not enough stack memory left to perform this operation error when opening a form which as part of its FormLoad event calls the following.

We have the database setup as a frontend/backend set.

We have the front end loaded on 3 desktops.

Code:
Private Sub Form_Load()
    Call UpdateStudentStats
End Sub

Private Sub UpdateStudentStats()
    Me.txtToday = "As of: " & Format(Now, "DDD. MM/DD/YYYY HH:mm:ss")
    Me.txtStudentsCheckedIn = StudentsAttended
    Me.txtStudentsRemaining = StudentsStillTesting
    Me.Requery
End Sub

Function StudentsAttended() As Integer
    StudentsAttended = DLookup("count([ID])", "tblScannedQRCode", "[ScanInDateTime]>=Date() And [ScanInDateTime]<Date()+1")
End Function
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi,

Very suspicious requery-ing a form in its Load event.

Also suspicious having a field named count([ID]). Not really something that should ever be a field name but I guess it's your choice. Better to stick to alphanumeric values only in field names - no spaces, no special characters.
 
Upvote 0

Forum statistics

Threads
1,221,899
Messages
6,162,686
Members
451,782
Latest member
LizN

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top