Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-access > #9248

Re: Enabling a Button, Depending on the Contents of Several Fields

From "Access Developer" <accdevel@gmail.com>
Newsgroups comp.databases.ms-access
Subject Re: Enabling a Button, Depending on the Contents of Several Fields
Date 2014-04-06 20:42 -0500
Message-ID <bqee40FfbmU1@mid.individual.net> (permalink)
References <hvguj9to8b1jfqmul10nuscnrnb4p4sjq3@4ax.com> <bq98guFs0o5U1@mid.individual.net> <p4e0k9p5c3kgpn0t9ma3mrtpg9p1n10nha@4ax.com>

Show all headers | View raw


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" <emailaddyinsig@ifIremember.com> wrote in message 
news:p4e0k9p5c3kgpn0t9ma3mrtpg9p1n10nha@4ax.com...
> On Fri, 4 Apr 2014 21:36:16 -0500, "Access Developer"
> <accdevel@gmail.com> 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" <hate@spam.invalid.net> 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
>> 

Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Enabling a Button, Depending on the Contents of Several Fields croy <hate@spam.invalid.net> - 2014-04-04 17:08 -0700
  Re: Enabling a Button, Depending on the Contents of Several Fields "Access Developer" <accdevel@gmail.com> - 2014-04-04 21:36 -0500
    Re: Enabling a Button, Depending on the Contents of Several Fields PW <emailaddyinsig@ifIremember.com> - 2014-04-05 11:10 -0600
      Re: Enabling a Button, Depending on the Contents of Several Fields croy <hate@spam.invalid.net> - 2014-04-05 17:23 -0700
      Re: Enabling a Button, Depending on the Contents of Several Fields "Access Developer" <accdevel@gmail.com> - 2014-04-06 20:42 -0500
  Re: Enabling a Button, Depending on the Contents of Several Fields Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-04-05 18:22 -0700

csiph-web