Jun 30 2011, 06:27 AM
would it be possible to check text wording during typing? for example-
"The big fox ran after the little fox up across the field field"
i have 2 entries of fox and 2 entries of field. i need to try and make something that would highlight a form control (textbox) with the duplicated word as i typed for example-
HALT! Field is entered twice
can this be done?
Jun 30 2011, 09:23 AM
You could check the field's Text property after each keypress (use the On Change event).
Jun 30 2011, 09:30 AM
i'll give that a go and report back.
Jun 30 2011, 09:37 AM
not sure if that would actually work. it would need to store the current word being types in order to check if the word existed...
it will need some serious thought lol
Jun 30 2011, 11:00 AM
Why is that then?
The field's Text property holds what is being typed into the control (providing it has the focus) as opposed to the control's Value property which holds the typed text when the focus leaves the control.
For example, this code should work :-
Private Sub YourTextBoxControl_Change()
Dim Words As String
Words = Me.YourTextBoxControl.Text
'some code to process data in variable Words
where YourTextBoxControl is the name of your Text box.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here