Unanswered: Error: Opening form with filter with no matching records??
(Access 2003) I have a company database form that calls a company contact form. Each company can have multiple contacts. By setting a filter on company name, when opening the contact form/table the filter returns an error if no company name/contact exists in the contact table. The relationship is set one to many. How can I test if company name exits in contact table and then apply the filter or else open the contact form to add a new record? All suggestions are appreciated!
On the company form, add a combobox whose row source is all contacts for the current company. Make sure the 'Limit To List' property is set to "Yes," and include some code in the "On Not In List" event to add a contact into the contact table. Open the contact form in the After Update event of the combobox.
What this does is to open the contact form with a previous contact name, if it was in the list. If not, it creates the new name and brings up the form with that name.