Error trapping

Mark-BES

Registered User.
Local time
Today, 06:47
Joined
Nov 23, 2004
Messages
85
I have a very simple macro that runs a query and copy/pastes the result into my form.

The problem I have is: If there is no matching result, I get a couple of errors telling me the copy function cannot be used (as there is no data to copy), the action has failed and the macro grinds to a halt.

(See the attached sample db and .jpg error mssg)

What and where would I enter a line in the macro that upon this event would stop the macro and display a simple mssg box?

I'm not yet familiar enough with vb (starting to learn) so for the time being need a macro to do the job.

Any help would be fantastic.
 

Attachments

Macro

One good reason not to use macros is the lack of posiblity to do
error trapping.
I think what you are trying to do can be done with some simple code.

Perhaps you can post your db with some data and forms, and I'm sure
someone will look at it and give you the right solution.
 

Users who are viewing this thread

Back
Top Bottom