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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|