G
Guest
I'm using a combo box to filter deliverys by group name. The form is based
on a select query which pulls all deliveries within a specific date range. I
have the combo box in the form header pointing to the Group Name table
(Account No, Group Name). In the After Update event procedure I have the
following code:
Private Sub cboFilterGroup_AfterUpdate()
If Not IsNull(Me.cboFilterGroup) Then
If Me.Dirty Then Me.Dirty = False
Me.Filter = "[Group Name] = " & Me.cboFilterGroup
Me.FilterOn = True
End If
End Sub
In the Form properties the record source is pointing to the select query
showing, date, account #, customer name, state, group name (with criteria set
to [Forms]![DeliverybyGroup]![cboFilterGroup] or
[Forms]![DeliverybyGroup]![cboFilterGroup] Is Null), and delivery time.
At first I had [Forms]![DeliverybyGroup]![cboFilterGroup] as the criteria
in the Group Name Table. When I open the Form I am prompted to enter the date
range (and that's what its suppose to do), but when I click on the group name
drop down list NOTHING happens. The group name is not filtered to select the
records requested. I also notice when testing that any group name previously
selected shows in the Form Properties/Filter field.
I do have a command button in the header to clear and select a new group name.
on a select query which pulls all deliveries within a specific date range. I
have the combo box in the form header pointing to the Group Name table
(Account No, Group Name). In the After Update event procedure I have the
following code:
Private Sub cboFilterGroup_AfterUpdate()
If Not IsNull(Me.cboFilterGroup) Then
If Me.Dirty Then Me.Dirty = False
Me.Filter = "[Group Name] = " & Me.cboFilterGroup
Me.FilterOn = True
End If
End Sub
In the Form properties the record source is pointing to the select query
showing, date, account #, customer name, state, group name (with criteria set
to [Forms]![DeliverybyGroup]![cboFilterGroup] or
[Forms]![DeliverybyGroup]![cboFilterGroup] Is Null), and delivery time.
At first I had [Forms]![DeliverybyGroup]![cboFilterGroup] as the criteria
in the Group Name Table. When I open the Form I am prompted to enter the date
range (and that's what its suppose to do), but when I click on the group name
drop down list NOTHING happens. The group name is not filtered to select the
records requested. I also notice when testing that any group name previously
selected shows in the Form Properties/Filter field.
I do have a command button in the header to clear and select a new group name.