Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Access Developer" Newsgroups: comp.databases.ms-access Subject: Re: Enabling a Button, Depending on the Contents of Several Fields Date: Sun, 6 Apr 2014 20:42:29 -0500 Lines: 59 Message-ID: References: X-Trace: individual.net tDcLUiJLl9TOfYiPwT9cwQhpeZInP9Rz67kmY7dAg2sL7cXPXg Cancel-Lock: sha1:CbozQo1b8Wjc18hbhaPAPh0fLK0= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Original Xref: csiph.com comp.databases.ms-access:9248 Yes, "Change" fires on each character... not sure if it fires on, say, a backspace keystroke. You can ignore any keystroke that doesn't cause your criteria to be met. I tend to avoid the focus events, because over the years, I've thought them to be a little flaky -- that probably just means I wasn't fully aware of all their idiosyncracies and they didn't work the way I expected them to work. -- Larry Linson Co-Author, Microsoft Access Small Business Solutions, Wiley 2010 "PW" wrote in message news:p4e0k9p5c3kgpn0t9ma3mrtpg9p1n10nha@4ax.com... > On Fri, 4 Apr 2014 21:36:16 -0500, "Access Developer" > wrote: > >>The Lost Focus event should fire when the user moves off that text Control >>after clearing it, and you could place VBA code, or you might check to see >>whether you can put code in the Control's Change event (that'd be the text >>box, also). >> >> -- >> Larry Linson >> Co-Author, Microsoft Access Small Business Solutions, Wiley 2010 > > Doesn't the Change Event fire with each key press? I might be wrong > but I've stayed away from it because of my perhaps incorrect belief! > > -paulw > >> >>"croy" wrote in message >>news:hvguj9to8b1jfqmul10nuscnrnb4p4sjq3@4ax.com... >>>I have several unbound fields that offer a user to set >>> filter criteria, and buttons to apply the filter criteria, >>> and clear the criteria. >>> >>> I've managed to make it so that if a user enters something >>> in any one of the criteria controls, the buttons become >>> enabled. >>> >>> But what if a user enters something, and then changes their >>> mind and clears the control manually, leaving all the >>> criteria controls empty? As it is now, the buttons stay >>> lit. >>> >>> What would be the best way to set things up so that if a >>> user has entered anything in any of the criteria controls >>> (enabling the buttons), and then manually deletes their >>> entry, leaving all the criteria controls empty, the buttons >>> become disabled? >>> >>> Any thoughts appreciated. >>> >>> -- >>> croy >>