Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 12-05-2005, 01:11 AM   #1
jvincent
Registered User
 
Join Date: Apr 2005
Location: France
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
jvincent is on a distinguished road
Char by char field controle ?

Hello,

In a form i have a field and i would like to test the field value character by character.
Ex : if the user typed ABCDE i want to detect the A as soon as the user typed A, etc..
I want to test each value of my field
A
AB
ABC
ABCD
and this before the user quit the field
I tried to to test with keydown event but the field value is null until user goes to the next field. i tried to concate each keycode but it's a little complexe if user press SUPPR, backtab, insert etc...
I want use this to do a search (like in listbox)
Thanks in advance for help.
VINCENT

jvincent is offline   Reply With Quote
Old 12-05-2005, 04:06 AM   #2
Dembrey
Registered User
 
Join Date: Mar 2002
Location: Paris, France
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Dembrey
Try looking at the OnChange event of the text control. this fires every time the contents of a text field changes.

HTH.
Dembrey is offline   Reply With Quote
Old 12-06-2005, 08:36 AM   #3
jvincent
Registered User
 
Join Date: Apr 2005
Location: France
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
jvincent is on a distinguished road
Hi Dembrey,
Thank you for the response.
I tried to test change event. Yes, each time i type a character program stop in the 'change event' procedure but the fields value stays empty until i quit the field. I would like to test the successive values of my field.
VINCENT

jvincent is offline   Reply With Quote
Old 12-06-2005, 12:00 PM   #4
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,237
Thanks: 15
Thanked 1,591 Times in 1,511 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
This is the situation in which you would use the .text property rather than the .value property which is the default. You will see the .text property change each type a new character is typed.
__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Old 12-07-2005, 12:21 AM   #5
jvincent
Registered User
 
Join Date: Apr 2005
Location: France
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
jvincent is on a distinguished road
Thank you very much Pat field.text works great !

jvincent is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
updating a null field with the value from the record above drewsterx General 2 07-14-2004 01:05 PM
Calculated Field (Sum) in Form tbaxter Forms 3 06-15-2004 07:37 AM
The field is too small to accept the amount of data you attemted to add. Mechele Modules & VBA 3 06-20-2003 08:26 AM
Transferring text from one field to a hyperlink field Erik Modules & VBA 2 12-23-2000 01:09 PM
Updating a field using Access Code connieharper Modules & VBA 4 11-27-2000 05:10 PM




All times are GMT -8. The time now is 12:59 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World