Mystery Parameter Request

sherlocked

Registered User.
Local time
Today, 15:44
Joined
Sep 22, 2014
Messages
125
I hope someone can help me solve this mystery. I have the below code behind a form so that a combo box will display a specific list of items based on the data in another combo box on my form.

I have two copies of this same form for two different departments. One of the forms works like a dream. However, when I copy that form, change the name, and update the code as pictured below, the form is asking for a parameter FROM MY ORIGINAL FORM and will not requery the combo box. I can't figure out why...there is no reference to the original form in my VBA as you can see below. I tried deleting the form and re-creating it, I tried deleting the code and re-typing it to no avail. Any ideas on what may be causing this? I'm at my wits' end. :banghead:

Private Sub cmboType_AfterUpdate()
Me.cmboAction.RowSource = "SELECT tblStatusList.Status FROM tblStatusList WHERE (((tblStatusList.Department)=[forms]![frmInquiryFraud]![cmboType]));"
End Sub
 
You could try removing the forms reference and just use Me. ?
 
Thank you kindly, but I'm afraid that doesn't work. I'm still getting the parameter request: forms!frmInquiryMain!cmboType

(this is my original form name, the one I copied to make frmInquiryFraud).
 
Do you have any references to forms!frmInquiryMain!cmboType in your recordsource for your form? Or your filter?
If you copied the form, it may have retained one of these without your knowledge.
 
Have you hard coded the recordsource in one of the combos?
It sounds very much like you have.

It is obviously there, you just need to find it.

Export the form to text, and you should easily be able to spot the reference.
 

Users who are viewing this thread

Back
Top Bottom