Error Message

Accesspert

Registered User.
Local time
Today, 13:59
Joined
Feb 16, 2006
Messages
36
I have a next button and previous button on my form. When I click on next this is the error that I get.
"The expression On Click you entered as the event property setting produced the following error: Ambiguous name detected: Delete_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 use the same button in another form and it works fine there.
How can i fix this?
Thanks.
 
sounds like you have two sets of codes with the same name.
If they are on a from prefix them private
Private Sub Delete_Click

HTH

Peter
 
It works perfectly now, thanks man.
Question though, now when I go to choose from my list in my combo box i can't select it, it shows me all my list but it doesn't let me choose it.
 
It works perfectly now, thanks man.
Question though, now when I go to choose from my list in my combo box i can't select it, it shows me all my list but it doesn't let me choose it.
 
Does anyone know how i can fix this? It won't let me choose anything it just keeps the drop down and doesn't let me choose it.
 
Sounds like you deleted the "on Click Event" for the combo box
 
No i don't think it has to do w/ that because my other form works fine and it doesn't have an on click event.
 
Yea i checked all those and everything is fine. I don't know y it's doing that.
 
I'd try deleting it and replacing it. If that doesn't work then try doing the same but with a different lookup table to see if that is the cause.
 
The problem is my query. I tested it w/ another query and it works fine. But I don't know what's wrong w/ it.
This is my query:
SELECT tblEmployeeInformation.strLastName+', '+tblEmployeeInformation.strFirstName AS FullName, tblManagerInformation.strLastName+', '+tblManagerInformation.strFirstName AS TLFullName, tblEmployeeInformation.strPhoneNumber
FROM tblEmployeeInformation INNER JOIN tblManagerInformation ON tblEmployeeInformation.strManagerID = tblManagerInformation.strManagerID
WHERE (((tblEmployeeInformation.strManagerID)=[tblManagerInformation].[strManagerID]));
 
I did that and it didn't make any difference. It still doesn't work.
 
is the combo bound to a table? is it limited to list? Does the data it return match the data type of the field if it is bound?

Peter
 
It works fine now, I changed my query to this:
SELECT tblEmployeeInformation.strFullName AS FullName, tblManagerInformation.strManagerFullName AS TLFullName, tblEmployeeInformation.strPhoneNumber
FROM tblEmployeeInformation INNER JOIN tblManagerInformation ON tblEmployeeInformation.strManagerID = tblManagerInformation.strManagerID
WHERE (((tblEmployeeInformation.strManagerID)=[tblManagerInformation].[strManagerID]));

However, now i have another problem. When I choose CSR Name I want the Team Leader name that matches the CSR Name to automatically change in the TL Field but it doesn't, it stays the same unless i go to the drop down and change it myself.
How would I do that? Thanks
 
Use the AfterUpdate event of the CSR name field to set the value of the TL field. You can use Forms!frmName!TLField.value = DLookup (more info here, use access help to lookup Dlookup), or if the CSR name field contains columns with the value you could say Forms!frmName!TLField.value = Forms!frmName!CSRField.column(?) where ? is the number of the column. Remember that the column numbers start with 0 and go up from there.

Hope this helps.
 
I tried what u told me but it doesn't work, it gives me an error saying: the expression after update you entered as the event property setting produced the following error: the object you referenced in the VB procedure as an OLE object isn't an OLE Object.
This is what i have in the expression builder =[Forms]![frmServiceQualityAssessment]![TLName].[Value]=[DLookup]

I'm sorry i'm a little slow and new at this.
 
I'm sorry, but I don't have time to explain the details of this. You can search for DLookup in the access help files. I, also, have never used the expression builder on forms so can't help with that syntax. I recommend setting this in code in VBA and hope that someone else here can help you with that.
 

Users who are viewing this thread

Back
Top Bottom