print button on form

unknown

Registered User.
Local time
Today, 03:52
Joined
May 4, 2003
Messages
19
i am just learning access so i dont know anything about macros or modules.

ok so i created a table, form, and report for my data base and everything works great but i wanted a print report button on my form. I used the wizard to create it and after entering in the data i push the button and get this error
"The expression On Click you entered as the event property setting produced the following error: Ambiguous name detected: print_Click.

*The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
*There may have been an error evaluating the function, event or macro."

i have no idea what i have done wrong since i used the wizard, i did choose the correct report as well so i am at a lost to what i did wrong:confused:
 
That error means you have more than one Sub Procedure in the forms' module that has the same name (Ambiguous) ....

Search the forms' module and locate the correct one and delete any others that have the same name.

HTH
RDH
 
Last edited:
there are no other ones that i can find
 
Just import the one offending form into a new empty database the zip it up and attach it.

Or ... copy and paste all the code in the offending forms' module in a reply for us to see.

RDH
 
here it is, there were no modules to import
 

Attachments

There are 3 procedures named "Private Sub print_Click()" in the forms' modue.

2 are the first 2 procedures in the forms module and the other is the last procedure (bottom of module page).

1 of these is the correct procedure and the other 2 have been "orphaned" from other attempts to use the event.

You will need to figure out which one is the one you want to use and delete the others .... or delete all 3 and recreate the event procedure again.

RDH
 

Users who are viewing this thread

Back
Top Bottom