Prev | Current Page 1381 | Next

Michael R. Groh, Joseph C. Stockman, Gavin Powell, and Cary N. Prague

"Access 2007 Bible"

You can do this using the FindWindow API in your startup routine. Check for
a running instance of Access at startup, and close the second instance if another is present.
The error handler called by both of these examples is really very simple. It merely reads the current
error and uses a Select statement to decide what to do. The only errors we??™ve included in this
module (modErrorHandlers) relate to this chapter. You??™ll notice that the ErrorRoutine function
has entries for error numbers 3186 and 3260. Each of these calls another subroutine,
ParseError. ParseError (in module modParseError) accepts the error number and error
message as arguments, and parses the user name and the machine name from errors 3260 and
3186. It doesn??™t matter which error has occurred because the parsing routine looks only for the
???user??? and ???on machine??? string values within the error message, so it??™s pretty generic. In fact,
this same subroutine is called from both errors. You can make the default Access error message
more descriptive, and you can also make use of the user ID and machine number within your error
log (if you keep one).


Pages:
1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393
Tworzenie stron internetowych szal boa Odzież Ciążowa muzykunia na f muzykunia na w