Hi All, I have a form that I would like to filter by the selection in an option group. This works ok if I select one of the two companies from the option group, form query uses this to filter records. I would also like to select ALL from the option group and see all records listed, How can I do this?
Private Sub Frame1296_AfterUpdate()
Select Case Frame1296
Case 1
Me.Frame1296.Tag = DLookup("[company Title]", "[application data]", " [id] = 4") ' show records from company 1
Case 2
Me.Frame1296.Tag = DLookup("[company Title]", "[application data]", " [id] = 5") ' show records from company 2
Case 3
Me.Frame1296.Tag = "" ' show all records
End Select
Me.Consignment_Note_Tracking___Incoming.Requery
Me.Consignment_Note_Tracking___Outgoing.Requery
End Sub
SELECT [Consignment Note Tracking - Outgoing].*, [Consignment Note Tracking - Outgoing].[from company]
FROM [Consignment Note Tracking - Outgoing]
WHERE ((([Consignment Note Tracking - Outgoing].[from company])=[Forms]![Main Menu]![Frame1296].[tag]));
How can I include both companies if I select option 3, at the moment it comes up empty.