Hi,
This is a classic example of Access not cleaning up after
itself. When you delete command buttons from the form,
Access does not delete the underlying code attached to
that button. So if, for example, you create a button
called refresh_Click using the wizard and later delete it,
the code is still there in the form's module. If you then
create another button called refresh_Click you now have two
subroutines in the code. Access gets confused because it
sees two code routines (or more) for the same button. In
essence Access is going "Dude, what's up with us?"
Go look at the code module behind your form and carefully
look around. You will probably see two or more code
routines for refresh_Click. Delete the code that is not needed.
Then compile to see if there are any other problems.
That should take care of it.