A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Default Access Errors



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2004, 12:02 AM
Bradley C. Hammerstrom
external usenet poster
 
Posts: n/a
Default Default Access Errors

A2K,

My form has an image frame. The user can pick and save the image to be
loaded into the frame. The path and filename are stored in a table (it's
always a path to a photo CD).

If the user tries to open the form when the CD is not loaded, I want the
error to be handled with a dialog, "Please insert CD". Instead, the user
sees a default error dialog from Access about how it can't find the path,
which is a bit technical for the user.

Q: How can I override, or pre-empt, the standard default Access error dialog
and use my own in it's place?

Brad H.



  #2  
Old April 30th, 2004, 03:31 PM
Ed Robichaud
external usenet poster
 
Posts: n/a
Default Default Access Errors

You could turn off the standard warnings with code
SetWarnings = False
then use a custom message box to show your own text
msgbox "Please insert CD..."

-Ed

"Bradley C. Hammerstrom" wrote in message
...
A2K,

My form has an image frame. The user can pick and save the image to be
loaded into the frame. The path and filename are stored in a table (it's
always a path to a photo CD).

If the user tries to open the form when the CD is not loaded, I want the
error to be handled with a dialog, "Please insert CD". Instead, the user
sees a default error dialog from Access about how it can't find the path,
which is a bit technical for the user.

Q: How can I override, or pre-empt, the standard default Access error

dialog
and use my own in it's place?

Brad H.





  #3  
Old April 30th, 2004, 05:48 PM
Bradley C. Hammerstrom
external usenet poster
 
Posts: n/a
Default Default Access Errors


But where to insert the code; in which procedure--Form_OnLoad? OnError?
OnOpen? I've tried these.

Maybe I'm putting the line in the wrong spot. Before the OnError statement,
or after?

Brad H.



  #4  
Old April 30th, 2004, 10:56 PM
Ed Robichaud
external usenet poster
 
Posts: n/a
Default Default Access Errors

Well you propably want to use an event tied to the image control, not the
whole form. The "BeforeUpdate" is a good place to start. Are your users
selecting the control source of a bound image control on your form? If so,
why not provide a list or combo box of available images for them to pick
from? You could also set validation limits on the image control and provide
a message when validation fails.
-Ed

"Bradley C. Hammerstrom" wrote in message
...

But where to insert the code; in which procedure--Form_OnLoad? OnError?
OnOpen? I've tried these.

Maybe I'm putting the line in the wrong spot. Before the OnError

statement,
or after?

Brad H.





  #5  
Old May 4th, 2004, 11:55 PM
Bradley C. Hammerstrom
external usenet poster
 
Posts: n/a
Default Default Access Errors

Ed.

Ah, here's the problem--the image control has no events. So where can I trap
the error?
I've tried the On Error event for the form. I've tried the OnLoad and OnOpen
events for the form, all to no avail. The default Access error occurs before
all of these events, apparantly. . .

Brad H.

"Ed Robichaud" wrote in message
...
Well you propably want to use an event tied to the image control, not the
whole form. The "BeforeUpdate" is a good place to start. Are your users
selecting the control source of a bound image control on your form? If

so,
why not provide a list or combo box of available images for them to pick
from? You could also set validation limits on the image control and

provide
a message when validation fails.
-Ed

"Bradley C. Hammerstrom" wrote in

message
...

But where to insert the code; in which procedure--Form_OnLoad? OnError?
OnOpen? I've tried these.

Maybe I'm putting the line in the wrong spot. Before the OnError

statement,
or after?

Brad H.







 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.