Hi. I have a form. That form allows me to insert appointment. I canonly make
one appoitment for each person. So my relationship is one to one.
Anytime I tried to insert more then one appointment per day it returnes a
error message from system. I have my one message, but the message system
keeps returning. What/how can I disable this message from system?
Regards,
Marco
ruralguy - 12 Mar 2007 19:30 GMT
Care to share the error number and message with this forum?
>Hi. I have a form. That form allows me to insert appointment. I canonly make
>one appoitment for each person. So my relationship is one to one.
[quoted text clipped - 5 lines]
>Regards,
>Marco

Signature
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.
Marco - 12 Mar 2007 19:43 GMT
Weel it's to big. I I can resume it: "There's an violation intigrity due a
primary key. do you want to run the macro anyway?"
This happens because I told to access that I cannot have to appoitments in
the same day. So I have a primary key in the employee code and another in
date. I just want to avoid the system warnings and put my own messages.
Regards,
Marco
> Care to share the error number and message with this forum?
>
[quoted text clipped - 7 lines]
> >Regards,
> >Marco
ruralguy - 12 Mar 2007 20:03 GMT
It is probably error number 3022 and implimenting error handling would solve
your problem but I don't think you can do that with Macro's.
>Weel it's to big. I I can resume it: "There's an violation intigrity due a
>primary key. do you want to run the macro anyway?"
[quoted text clipped - 11 lines]
>> >Regards,
>> >Marco

Signature
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.
Marco - 12 Mar 2007 20:14 GMT
Can you help me?
Marco
> It is probably error number 3022 and implimenting error handling would solve
> your problem but I don't think you can do that with Macro's.
[quoted text clipped - 14 lines]
> >> >Regards,
> >> >Marco
ruralguy - 12 Mar 2007 20:22 GMT
I'm afraid you will need to wait for someone who is more familiar with
macro's. Sorry.
>Can you help me?
>
[quoted text clipped - 5 lines]
>> >> >Regards,
>> >> >Marco

Signature
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.
fredg - 12 Mar 2007 20:58 GMT
> Hi. I have a form. That form allows me to insert appointment. I canonly make
> one appoitment for each person. So my relationship is one to one.
[quoted text clipped - 5 lines]
> Regards,
> Marco
You can use code to replace the system message with your own.
Here's how you can find the correct error and show your own message
for any of the form level errors.
First code the Form's Error event:
MsgBox "Error#: " & DataErr ' Display the error number
Response = acDataErrDisplay ' Display Default message
Then open the form and intentionally make that error.
The message box will display the error number and the default error
message.
Next, go back to the error event and change that code to:
If DataErr = XXXX Then
Response = acDataErrContinue ' Don't display the default message
MsgBox "Present your own message here."
Else
MsgBox "Error#: " & DataErr
Response = acDataErrDisplay ' Display Default message
End If
where XXXX is the error number.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail