using VB to do data manipulation problem

My program is to use VB to do some data manipulation in Access database. What I did in VB code is simply run some predefined macros.(such as import text file into access table and export).Also, using DAO to execute some sql command. Sometimes, while the program runs, it has error message such as: the access database doesn't response, switch to it? Does anyone know what cause this kind of error?  Could be the database getting too big? What is size limitation for Access database?
Also, by the time, the database grows very big, I do some delete to clean up. After executing the 'delete' command, I suppose to compact the database. Should I use the compact method in VB? Or is there better way to do it? since the compact command requires to create a new DB based on old DB. I want to simply compact the old db in the VB code. Any suggestion?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

  ' clear residue database left if this routine has gone wrong.
    If Dir(App.Path & "\temp.mdb") <> "" Then
        Kill App.Path & "\temp.mdb"
    End If

    ' compact databse to spare database
    DBEngine.CompactDatabase sDataBase, App.Path & "\temp.mdb"
    ' move status bar
    frmAutograph.lblCompleteProgress.width = (iIncrement + 1) * (nWidth) / iTotalIncrement
    FileCopy App.Path & "\temp.mdb", sDataBase

    Kill App.Path & "\temp.mdb"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.