I have a search form (frmSearch) that has a Listbox (SearchResults) that is populated by a query. The WHERE clause on that query is 'like *searchtext*', and I get 'searchtext' from a field on the screen that the user can use to narrow the list of records in the Listbox. Once the user double clicks on the record they want, I put up an Edit form for them to modify the record. On the 'Form Close' event of the Edit form, I have this code:
Forms("frmSearch").SearchResults.Requery
Which reloads the SearchResults list box, however I would like to clear the 'searchtext' variable on the the first form so I see all the updated records on the first form. In the line of code above, I reference a Listbox on the other form, is there VBA code to set the 'searchtext' = ""?