From what I see you're making it too complicated. If you're not going to have thousands of records in the form when it opens, just filter it based on the search term entered. No need to requery:
Me.Filter = "[FoodItem] LIKE '*" & Me.txtSearch.Text & "*'"
Me.FilterOn = True
No need to set focus to a control that already has focus because you're typing in it anyway. Remove that and maybe the extra row problem will go away when you set allow additions to no. However, you can't set focus to a disabled control so that could be at play. I've made too many changes to go back and figure out if that was involved in your coding. It may have been that the form was trying to activate a record and since the record only has one field and it's disabled, that would be a problem. Depending on the desired user experience, it may be enough to lock it. The weird thing about your form is that when it loads there are 10 records that I can't read, yet the control in the form seems to be formatted ok. BTW, if you filter you don't need the function either. If you will have too many records to start out with a full form, then it makes sense to start with no or a limited set of records, then start requerying.
EDIT - or open the form based on the search form that should come before the results form.
EDIT2 - I see the problem re: not seeing values in the record. Never would have occurred to me that the control would have been set to invisible. That makes no sense.
Last edited by Micron; 04-07-2025 at 11:42 AM.
Reason: correction
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.