Updating form filter after combo box selection.

cmcritchie

New member
Local time
Today, 22:08
Joined
Sep 24, 2001
Messages
8
Hi,
Just wondering if anyone knows how I can reapply a form's filter after a new item is selected from a combo box on the form?
I am using the value of the combo box in the filter and need to update the records displayed when a new value is selected. I
can currently do this via a seperate command button which issues the following On_Click code:

Private Sub Change_Weekly_Filter_Click()
On Error GoTo Err_Change_Weekly_Filter_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70

Exit_Change_Weekly_Filter_Click:
Exit Sub

Err_Change_Weekly_Filter_Click:
MsgBox Err.Description
Resume Exit_Change_Weekly_Filter_Click

End Sub

This updates the filter with the new value when clicked but I need it to happen automatically. If I try to use the

DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70

command at the On_Updated event of the combo box nothing happens. (NB it is an ActiveX date pick combo box that is used so has an On_Updated event instead of After Update)

Thanks
 

Users who are viewing this thread

Back
Top Bottom