Filter by Two Combo Boxes on a form

M

magmike

I have a continuous form that shows all Call Backs. At the top, I have
a combo box that is populated with dates and automatically updates
with only dates that have call backs scheduled. The user can select a
date using that combo box and then the form only shows the call backs
with that date. The code is as follows:

Private Sub CallDateLookup_AfterUpdate()
DoCmd.RunCommand acCmdRefresh
DoCmd.ApplyFilter "", "[CallDate] = #" & CallDateLookup & "#"
End Sub

I'd like to add another combo box for the Priority field, however, I
am not sure how to code the new combo box (data is an integer) so that
if the other box is null, it only filters by the priority, and if not,
it filters by both combo boxes, and vice versa.

Any help would be appreciated.

Thanks in advance!
magmike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top