I have a Access form that has several combobox lookup controls are used to create the SQL statement to apply filters to the querry. This worked fine if the filter found matching records or not. My problems started when I attempted to add a activex date control. The form and code works fine as long as the applied filter finds matching records. If no matching records are found, and I attempt to change the axtiveX control of my date ranges for the querry filter, I recive the following message.
Run -time error '2771':
The bound or unbound object frame you tried to edit doesn't contain an OLE object.
It breaks on the following code.
If atxStartDate.Value > atxEndDate.Value Then
atxEndDate.Value = atxStartDate.Value
txtEndDate = VBA.FormatDateTime(atxEndDate.Value, vbShortDate)
The controls are not bound to the record, they are only used to write the SQL code to apply to the filter of the querry.