Hi all,
I am having problems using the filelen function to determine the size of a database while the code is running. I have an Access database that is performing numerous calculations 1000’s of times with tables/temporary tables etc. The problem is that eventually Access exceeds it’s 2gb limit before the model has finished running. (Unfortunately, I am restricted in that I have to use Access and not something more sophisticated like SQL Server etc, and Excel would take too long). In order to prevent Access exceeding it’s 2bg limit, I have tried using the filelen function:
If FileLen(Currentdb.Name) > etc etc Then
Whilst this works absolutely fine whilst stepping through the code (F8), and going through each loop step by step, it fails to update if I let the code continue running at it’s normal speed. It will keep on running even when the current database size is larger than the criteria specified in my IF statement. I have tried using DoEvents but this has been to no avail.
Any ideas? Perhaps a delay in the code, though not too long as it has to loop 1000’s of times, so it would be delaying for each loop.
Thanks
I am having problems using the filelen function to determine the size of a database while the code is running. I have an Access database that is performing numerous calculations 1000’s of times with tables/temporary tables etc. The problem is that eventually Access exceeds it’s 2gb limit before the model has finished running. (Unfortunately, I am restricted in that I have to use Access and not something more sophisticated like SQL Server etc, and Excel would take too long). In order to prevent Access exceeding it’s 2bg limit, I have tried using the filelen function:
If FileLen(Currentdb.Name) > etc etc Then
Whilst this works absolutely fine whilst stepping through the code (F8), and going through each loop step by step, it fails to update if I let the code continue running at it’s normal speed. It will keep on running even when the current database size is larger than the criteria specified in my IF statement. I have tried using DoEvents but this has been to no avail.
Any ideas? Perhaps a delay in the code, though not too long as it has to loop 1000’s of times, so it would be delaying for each loop.
Thanks