Subform Combo Box Autofilter Error

juice75

New member
Local time
Today, 07:32
Joined
Dec 22, 2001
Messages
6
I have been trying to create a simple subform with synced. combo boxes. However when trying to link the second combo box to the first I receive the attached error message when selecting a value in the first combo box. Anyone have any ideas why I would be receiving an autofilter error message? The message states I have tried to apply a filter on a form that is not open.

Any information is appreciated. Please see attache error message.

OJ
 

Attachments

  • error.gif
    error.gif
    35 KB · Views: 226
I see you have the On_Change of the ProjectID combo set to requeryEmpWorkBudgetID
Instead, change it to [Event Procedure], click on the code builder(...) and enter

Me.EmpWorkBudgetID.Requery 'Assuming thet EmpWorkBudgetID is the name of the combo you are trying to sync.

See if this solves it
 
EmpWorkBudgetID is not the name of the combo box. "requeryEmpWorkBudgetID" is the name of the macro I created to requery the "BudgetID" combo box. Unfortunately I never get that far since this very annoying auto filter error keeps rearing it's ugly head every time I select a value from the "ProjectID" combo box.

OJ
 
What else do have in the macro other than the combo requery?
 
Nothing else. Just the requery command. But thanks for your advice because after I scrapped the use of the macro to requery the BudgetID combo box and placed one line of code in an Event Procedure the requery works without the horrible autofilter error. I don't understand why one way works to requery and the other way doesn't, but at least one way works. :)

Anyways, thanks again.

OJ
 
In general, code seems to run faster and is easier to debug than macros. I use VBA for nearly all my procedures and so do most of the folks here. It would benefit you to delve deeper into VBA programming and use this as standard for your application.
 

Users who are viewing this thread

Back
Top Bottom