advanced microsoft access training london - error trapping

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » advanced microsoft access training london - Error Trapping

advanced microsoft access training london - Error Trapping

resolvedResolved · Low Priority · Version Standard

Dave has attended:
Access VBA course

Error Trapping

I have created an Access database employing only tables, queries and forms (no modules), and wish to deploy it to a user who is using only the MS Access Runtime. Experience has shown that I need to incorporate error trapping.
Does this mean that each form needs to be opened from within a module, rather than directly from the Switchboard, as I have it at the moment?

RE: Error Trapping

Hi Dave

Yes you definately need to include error trapping as otherwise the user will just get a really horrible error message given too them by access and then the application will close.

As far as opening everything from within a modules goes, I think that you should be fine just opening everything from switchboards.

Hope thins helps

David

RE: Error Trapping

My question was more to do with how to include error trapping.
I can see that I could do it by opening the form from within a module that included an error block, but your answer implies that I can implement error trapping without doing that.

RE: Error Trapping

Hi Dave

What I meant by this was that you should be able to code all of the error trapping directly into the VBA. You should place a statement within your could so that anywhere that an error could occur, there is a statement to catch the error, and then call an error handler. An example is shown below

Sub MystuffHere()
On Error GoTo ErrorHandler
My statements here
Exit Sub
ErrorHandler:
My error handling statements go here
End Sub


I hope this helps, if not get back to me

David


 

Access tip:

Compact database automoatically

To ensure optimal performance, you should compact and repair your

Open the Access database or Access project that you want Access to compact automatically.
On the Tools menu, click Options.
Click the General tab.
Select the Compact on Close check box.

View all Access hints and tips


Server loaded in 0.09 secs.