I have two forms, one the Criteria Form and the other the Results Form. The Criteria Form's fields (text, combo or checkbox, but not hooked to a table) equate to fields in the Criteria form's Activity.db. Based on entries in several fields in the Criteria Form, I want to filter the table values in the Results Form. However, I only want to filter the Results form's Activity.db on values in the Criteria Form if they're NOT blank, i.e., I only want to filter the Results Activity.db on fields that have data in the Criteria Form. I am NOT using a datamodule.
For example, The Criteria Form has fields 5 fields - City, Entertainment Type, Event Type and High and Low Cost, each having corresponding fields the Activity.db on the Results form. If a user only entered data in 3 of the fields, how do I filter the Activity table using their corresponding fields, on those values only? I don't want Delphi to search for the Criteria Form's City.text entry in the Results Form's Activity.db High Cost field.