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!

Subform doing wierd things!! Help!!

Status
Not open for further replies.

asenft

Programmer
Apr 24, 2001
52
US
I have a subform that has 2 combo boxes on it. The subform is matched to the parent form by the field Job_Name. When i pick a value for the first combo box, and click on the second combo box, it updates the query based on the value of the first combo box. This works perfectly if I am using the subform by itself, but when i use the subform in the main form, the way a subform is supposed to be used, it pops up a parameter value box. Its basically saying that it can't find the value of the first combo box. But it works perfectly if this form isnt imbedded into the main form. Any ideas what could be causing this??

Also, when i try to do a docmd.refresh on the subform, it brings up an error that says:

Run-time error 2488:

You can't use the ApplyFilter action on this window.

I have it set to yes for allow filters and everything. I can't figure out what this thing is doing. Someone please help!! :)

Aaron
 
You must change the path to the criteria to include the mainform.

Forms!MainFormName!SubFormName!ControlName
 
Awesome! Thanks Jerry. It workes perfectly now. Now if i could just figure out that ApplyFilter error, i'd be all set.

 
You should not need to do any type of refresh on the subform. It should be linked to the mainform via master/child fields. How are you trying to use the subform?
 
I have 3 separate subforms on my main form. One subform holds the contact information for a job, one holds the products spec'd out, and the other holds any notes/comments about this job. I have an add new button on the subforms that opens a new form (respective to what subform you are on) so that you can add a new record to that subform. I have the subform setup as continuous forms. When i close that form that opens from the add new button, i need the subform to show the new record. That is what i am having trouble with. I have done the requery before on subforms in different databases and it worked fine. But on this one, i get that wierd ApplyFilter error. Any ideas??

 
Jerry-
You have all the right answers today! Thanks sooo much! This has been bugging me for days, and i just knew it was something dumb. Thanks again!!

Aaron Senft
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top