Looking for a good example of a Semi-Bound Form
I recently read a book that recommended using unbound forms for optimum performance and as having many benefits when dealing with multi-user databases. However, none of the books that I have seen really cover this in much depth.
I'm writing a semi-bound form right now because the multi-table query that the form is based on is not un-updatable. So, I placed four unbounded fields on the form and load them from hidden fields bound to the query using vba code in the form. When the user changes the values in the unbound fields I use an update statement in the form to push the changed values back to the table. This all works well.
At least it did until the user wanted to use the find and filter features built into Access. Darn those users :) The problem was that these features ignore the unbound fields and the hidden fields so the users couldn't search or filter by the most important fields on the form.
To get around this I temporarily bound these field's controls when the user pressed a "find" button on the form or for the filter option, I used the two associated events to bound and unbound the field's controls. This worked for the filter, but only worked on the first search for find.
The problem with find is that after the fields are unbound again, the user may want to use the Find Next function on the find dialog, and this causes the find to blow up. Even if instead of binding my extra fields, I hid them and made the found ones visible, I still have a problem because the user would want to make changes to the data. Adding buttons to manage the hide/unhide would help, but as long as the find dialog is showing they will be the potential for the user to try and use it and then it will blow up again.
Are there any even hooks that I can use to control find or is there a good example of how to replace it with something better than a single search field at the top of the form, which seems to be the method used in most books? What I'd like most is to use the built-in find, to offer a search by form, and a query grid similar to the advanced filter, but which takes you to the next match rather than the re-selecting records in the query.
Thank you.
|