Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 October 27th, 2003, 05:01 AM
Authorized User
 
Join Date: Oct 2003
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default textfield




hi,

i have a form with a textfield and a command button.
how can i detect if the user has entered anything to the textfield before i actually anabled the command button.
i did not use got focus as i have gave the focus to the textfield when the form first loaded.
i too did not use after update as after the user have to hit the enter then the command button will be enabled.

is there a way to detect that at least one char is entered to the field then the command button will be enabled?


pls advice
nono
 
Old October 27th, 2003, 06:22 AM
Authorized User
 
Join Date: Jun 2003
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default

use the OnKeyDown event
 
Old October 27th, 2003, 10:24 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

You could keep the button disabled and then enable it on the textbox's "On Dirty" Event. On the textbox's "AfterUpdate" event, check to make sure the user didn't enter nothing into the box (i.e. started typing and then erased it), and if so, disable the button again.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Textfield deean Pro JSP 1 June 19th, 2008 02:11 PM
creating textfield on the fly Acod Classic ASP Professional 1 April 25th, 2007 09:22 AM
comparing value in session variable and textfield johnsonlim026 ASP.NET 1.0 and 1.1 Basics 3 August 7th, 2005 12:01 AM
show new textfield from drop-down list dhaywirex Javascript How-To 2 March 11th, 2004 09:16 PM
saving textfield format in database dhaywirex Classic ASP Databases 3 March 10th, 2004 12:13 PM





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