"but should my program ever error it always brings up the option to debug it"
That means your code is flawed by lack of error trapping.
As a program developer, you
must think of all possible errors that may occur in
each line of code and trap them all in an error handling piece of code that should exist in any procedure, be it Sub or Function.
On Error Resume Next
is the statement to be used when ALL errors that may appear are insignificant and their skipping does not affect anything. For instance, the attempt to append a duplicate record will fail because of the primary key. The above statement will skip the offending line and move to the next statement. This is only an example, depending on the specific cases, such error may need handling.
In all other cases, you need something like:
On Error GoTo ErrHandler
'all your code here
Cleanup:
Set rst = Nothing
Exit Sub 'or Function
ErrHandler:
Select Case Err.Number
Case 3020
MsgBox "To update the recordset you have to use Edit or AddNew"
Resume Cleanup
'Other cases here
Case Else 'this is for impossible cases
MsgBox Err.Description
Resume Cleanup
End Sub
It just has to be done (in my opinion
![[smile] [smile] [smile]](/data/assets/smilies/smile.gif)
)
And after that, convert the database to an mde file...
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)
Daniel Vlas
Systems Consultant
danvlas@yahoo.com