Avoiding error message 30014 for end user

  • Thread starter Thread starter Michelle Vairo
  • Start date Start date
M

Michelle Vairo

Kevin - thank you very much for your response!

Yes, my form is created with an underlying query. This
particular form is only for PENDING records. What is
constantly changing is that PENDING records are becoming
APPROVED. I do not want the records to show up in this
form any longer after they become APPROVED. Therefore,
once the enduser changes the record to APPROVED and tries
to move on to the next, they get that error message.

All they have to do is hit "end" and then "halt" on the
error messages, and things progress as usual, but I do not
want them bogged down with this message every time they
approve a record.

With that said, do you think it is best to add error
handing for this error, or is there a way around it?

Thanks again,
Michelle Vairo
(e-mail address removed)
 
Michelle,

Try using <font size="2">Me.Requery.</font> If you use a
command button to change the status, put this into the
OnClick event. If you use say a combobox, put it in the
Oncurrent Event for the form. This event fires (I believe)
everytime you move to the next record.

The other method you could try is docmd.openform. Put a
where condition in and that should filter out the message.

As far as Error handling, the only reason you would add it
is because you have a situation you can't do anything
about.

Post back if either method does not do what you need.

Kevin
 
Since this is a data error, it can probably be trapped in the Form's OnError procedure.
However, I just created a form and query on some test data and changed the value of the
field that had the criteria in the query to a value that wouldn't be returned by the query
then changed records to save the new value. The record was still displayed. I would have
to requery to get rid of it. What are you doing that is prompting you for this since it
appears that simply violating the criteria of the query is not sufficient to get this
error?
 
Thanks for your response, Wayne!

This is the code I have on the click event of the
cmd_Approve command button. When I try to go to the next
record, that is when I get the error.

Private Sub cmd_Approve_Click()
DoCmd.SendObject acSendNoObject, , , , , , _
"PTO Approval", _
"Your PTO request has been approved. Please check
your personal report for details."
Me.UniqueTable = "tbl_PTO"
Me.pDateApproved.Value = Date
Me.pStatus.Value = "Approved"
End Sub
-----Original Message-----
Since this is a data error, it can probably be trapped in the Form's OnError procedure.
However, I just created a form and query on some test
data and changed the value of the
field that had the criteria in the query to a value that
wouldn't be returned by the query
then changed records to save the new value. The record
was still displayed. I would have
to requery to get rid of it. What are you doing that is
prompting you for this since it
 
Thanks again, KEvin. I have tried the Me.Requery, and
that still produces the same error message.

I am not sure of the syntax for a where condition in the
open form event that would keep this error msg from
appearing. If you have an example easily available,
please let me know.

Again, I appreciate your help.

Michelle
 
I tried changing it through code, as you have here. I tried both the name of the control
and the name of the field the control was bound to and neither gave the error. Do you have
more than one form open at a time? What is the source of your data, an mdb file or SQL
Server? I'm just using an mdb file and that may be the reason I'm not getting the error.
 
Hi Wayne - It is a SQL Server 2000 backend, with Access
Project as the frontend. (It is the only form open.)
-----Original Message-----
I tried changing it through code, as you have here. I
tried both the name of the control
and the name of the field the control was bound to and
neither gave the error. Do you have
more than one form open at a time? What is the source of your data, an mdb file or SQL
Server? I'm just using an mdb file and that may be the
reason I'm not getting the error.
 
Ok, I'm guessing that the error is coming from the SQL side then. You should be able to
trap it in the Form's OnError event (not just an error handler in one of the other
events), but I don't use SQL server. Maybe someone who has will jump in here is something
else needs to be done.
 
Hi folks,

Can I suggest looking at the Access 2000 help for this one. There is a help
topic with the heading "ResyncCommand and UniqueTable Properties Example
Scenario" which may be of assistance.

--

Jamie :o)

Ok, I'm guessing that the error is coming from the SQL side then. You should
be able to
trap it in the Form's OnError event (not just an error handler in one of the
other
events), but I don't use SQL server. Maybe someone who has will jump in here
is something
else needs to be done.
 
Back
Top