Button on Form

C

citloner

I have created a button on a form meant to preview a report (used button
wizard to specify function and report name). The button seems to be ok, but
when I go to use it I get the following:

"The expression On Click you entered as the event property setting produced
the following error: Ambiguous name detected: Directory_Click"

The report seems fine. Why is this happening. I have successfully done
this before.

Thanks!
 
J

John W. Vinson

I have created a button on a form meant to preview a report (used button
wizard to specify function and report name). The button seems to be ok, but
when I go to use it I get the following:

"The expression On Click you entered as the event property setting produced
the following error: Ambiguous name detected: Directory_Click"

The report seems fine. Why is this happening. I have successfully done
this before.

Thanks!

You may have some extra VBA code left from a previous attempt. Open the Form
in design view, and click the Code icon (or view its properties and view the
Click event of the button in the VBA editor).

Use the binoculars tool to search for "Directory_Click". I suspect you have
two lines in the code with Sub Directory_Click(). Keep the new one and delete
the entire sub (from Sub Directory_Click through End Sub) for the "other" one.

Back up your database first of course!! And you might want to Compact the
database after you delete the sub.
 

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

Top