Error in Access

  • Thread starter Thread starter Christophe Bauters
  • Start date Start date
C

Christophe Bauters

Dear,

I've made a form in Access but when I Click on a button there comes an
error:

The expression By clicking that you gave as adjustment for the event
property, has made the following error:

* The expression doesn't have the name of a macro, the name of a by user
definied function or an [eventprocedure] as result
* There appears an error by evaluating a function, event or macro.

My version of Access is in Dutch, so it can be that there are mistakes in
the error I wrote down here. My apologys for that. Can someone help me
please?

Thank you, Christophe
 
Christophe,

We would need a little more detail in order to help you.

1. What is the button suppose to do?

2. Can you post here the code that is in the On_Click
event of the button?

3. If a macro is attached to the button, will the macro
work manually?

Rosco
 
Rosco,

1. There are more buttons that give the same error, but one of the buttons
is supposed to close the form.

2. This is the code in the On_Click event of the button to close the form,
but I'm sure that it's not the code, because I made it with the wizard:
Private Sub FormulierSluiten_Click()
On Error GoTo Err_FormulierSluiten_Click


DoCmd.Close

Exit_FormulierSluiten_Click:
Exit Sub

Err_FormulierSluiten_Click:
MsgBox Err.Description
Resume Exit_FormulierSluiten_Click

End Sub

3. There isn't a macro attached to it. It's VBA-code.

Thank you, Christophe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top