Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Buttons Won't Work

Status
Not open for further replies.

ff18wife

Technical User
Sep 6, 2001
58
US
With my main form, i have placed a series of command buttons, i.e. search, navigator, open form, save, delete, etc, in the footer area. They have been working fine, up until now. As the database as developed, the buttons are now not working and the follwing error message comes up. "The expression On Click you entered as the event property setting produced the following errod:Ambiguous name detected: CPCData_Click. *The expression may not result in the name of the macro, the name of the user-deined function or [Event Procedure] *There may have been an error evaluating the function, event, or macro.

Any ideas on how to rectify? Tried deleting the action buttons and then putting them in again, but same error comes up again. Access 97 version.

Can I check the code and delete ALL of the entries? Will this enable me to create new buttons from scratch?

Thank you!
 
If you go into the code window, you will find that there are TWO or more CPCData_Click events. Access doesn't know which one to use so it tells you that there are more than one and won't run any code because it could crash if it did. The solution is to delete one of the CPCData_Click events.

HTH Joe Miller
joe.miller@flotech.net
 
Joe-
Thank you for your reply so quickly. I've been trying that but not sure if I can delete ALL of the codes and start over since there are so many.
I will keep deleting.
Thanks again. :)
 
Ok, I was able to replace all but 1 button. The problem is that when I click on the button it is supposed to open up to a record that corresponds to the main page, linked by an ID#. The pages are not linking and when I click on the button, it opens up to a different ID#.
What did I miss????
 
which ID is it opening? the first record of the underlying table/query?

what is OnClick code? either you have to have a where statement in the OpenForm method of the OnClick event ("ID = forms!main!txtID" or whatever) or the query that the form is based on has to have that criteria in it. is either of these true?

g
 
Ginger-
It opens to a blank record. If I try to enter a new record using the id #, it tells me I'm trying to create a duplicate record. If I try to find my id #, it tells me that I can't use find or replace now.

How do I view the OnClick code? The same as above?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top