Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 24th, 2006, 04:27 PM
Authorized User
 
Join Date: Apr 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Bound Controls cpanson ADO.NET 0 June 24th, 2006 07:29 PM
Create a semi-colon delimited value rshano XSLT 1 January 14th, 2004 05:36 AM
(Semi) Automating Mail merge to Word Cryolith Access VBA 0 July 6th, 2003 10:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.