Re: How to Bypass "not enough memory to undo" nmessages



1) use code instead of macro's

and

2) code like this
Dim qdf As DAO.QueryDef
Dim db As DAO.Database
Dim prm As DAO.Parameter


set db = currentdb

db.execute "name of my query 1"
db.execute "name of my query 2"
db.execute "name of my query 3"

This will run much faster, and will have no messages at all.
If you have in your queries references to forms, you will
have to resolve them before running the query, like this:

set qdf = db.querydefs("name of my query")
for each prm in qdf.parameters
prm = eval(prm.name)
next prm
qdf.execute

(david)


"Phil" <phil_at_nhs@xxxxxxxxxxx> wrote in message
news:O4zj$wOXGHA.1348@xxxxxxxxxxxxxxxxxxxxxxx
I hae a series of quieries rolled into a macro. Large amount of data and
many transitional steps results in an hour or more runtime, and of course,
lots of messages saying there is inusfficient memory to undo...

Now, I have seen the Reg fix where you increase the the number of locks.
Does not seem to help with 3 million or so records in each update.

Sendkey seems to be useless.

Any ideas?


.



Relevant Pages

  • Re: ADODB Recordset Not Loading From Parameter Query
    ... The query itself runs fine when running manually and supplying the ... Dim con As ADODB.Connection ... Dim prm As ADODB.Parameter ... Set prm = cmd.CreateParameter("@LastName", adVarChar, adParamInput, 25) ...
    (microsoft.public.access.modulesdaovba)
  • Re: QueryDef
    ... enough to evaluate when the query is opened from the database window. ... Dim db1 As Database ... Dim prm As Parameter ...
    (microsoft.public.access.formscoding)
  • Re: Loading query into a recordset...
    ... Set MyRecordSet = qdf.OpenRecordset ... For Each prm in qdf.Parameters ... > You don't need to use the name of the query in the OpenRecordset action. ... >> Dim MyRecordSet As DAO.Recordset>> Dim qdf As QueryDef ...
    (microsoft.public.access.modulesdaovba)
  • Re: How can I group on a field in a query based on a value in a fo
    ... Dim FieldsToInclude As String ... Dim strSQL As String ... Dim qdf As DAO.QueryDef ... > different fields that the query could group on. ...
    (microsoft.public.access.macros)
  • Re: OpenRecordset
    ... query is taking values or criteria from fields on a form (which are treated ... Dim qdf As DAO.QueryDef ... Dim prm As DAO.Parameter ...
    (microsoft.public.access.formscoding)