problem

  • Thread starter Thread starter liem khen
  • Start date Start date
L

liem khen

I have a form with:
** a button to add new record (I have vba there).
** in the onerror event property,I have vba preventing to
duplicate data (dataerr=3022).
individually it works well.
as I push Ctrl+a (the format property of the button I put
the "&" -->ampersand)there comes up a window written
runtime error =2501.
why could it be that way ?
I hope anybody will help me !

thanks
 
Have you tried using the debugger? I'd strongly recommend you to use it. Try
and put breakpoints in your code to narrow it down to a line or a block.
It'll be much easier to figure out the problem then.
 
mr. kailash,
if I click debug,there comes up a window with yellow high
light in code "docmd.gotorecord,,acnewrecord".
while I close the form (after closing the code window) an
error (I create it with vba )comes up telling the
duplication(so it works well actually !).
should we add routine error handler (according to "evan
callahan" on a book that I read),but I can not put the
error event (that I create) correctly.
what to do then
thanks
 
Back
Top