Re: Coding Issue



It does not have to change while the information is being type. But what I
was trying to say is that its not changing at all. It remains with a white
back color regardless of what I put in. All others are changing based on the
set WORDS entered in the [Overall Classification] field. But the [Overall
Classification] entry field is not changing as it was when I first started.
I made some change to try to get the other fields to work. And really can't
figure out what I did to make it stop working. Hope that cleared my intent
up better.
--
Work is sometimes hard....but someone has to do it.


"Baz" wrote:

If I understand you correctly you want the code to be executed while someone
is still typing in the box, is that right?

As you have discovered, the AfterUpdate event only executes after the typing
is finished. To run the code as each letter is typed, the Change event or
the KeyDown event of [Overall Classification] is probably the best place to
put it. Make sure you refer explicity to the Text property, thus:

If InStr(Me.[Overall Classification].Text, "SECRET") = 1 Then

"Pierre" <Pierre@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9A30FD82-E728-4C5B-A02D-E7FB7DB5B91B@xxxxxxxxxxxxxxxx
Baz that was very helpful and worked like a cherm.

I have another code that was working at one point. But stop working after
I
was trying to fix the one I just spoke about. Is it possible to view this
and inform me to what I did (changed) wrong. It is suppose to change as
text
is entered or based on the text in the box. Similar to the others, excite
this is the box where the initial Classification is being entered. Hope
that
made sense. Here is the Code:

Private Sub Overall_Classification_AfterUpdate()

If InStr(Me.[Overall Classification], "SECRET") = 1 Then
IngColor = 255
ElseIf InStr (Me.[Overall Classification], "TS" = 1 Then
IngColor = 65535
Else
IngColor = 0
End If

For InVal = 220 To 240 Step 2
Me.Controls("Text" & IntVal).BackColor = IngColor
Me.Controls("Text" & IntVal).Value = Me.[Overall Classification]
Next

End Sub




.



Relevant Pages

  • Re: Coding Issue
    ... (only the Overall Classification field box has this issue) ... Private Sub Overall_Classification_AfterUpdate ... IngColor = 255 ... is still typing in the box, ...
    (microsoft.public.access.formscoding)
  • Re: Coding Issue
    ... (only the Overall Classification field box has this issue) ... Private Sub Overall_Classification_AfterUpdate ... IngColor = 255 ... is still typing in the box, ...
    (microsoft.public.access.formscoding)
  • Re: Coding Issue
    ... Private Sub Overall_Classification_AfterUpdate ... IngColor = 255 ... set WORDS entered in the [Overall Classification] field. ... is still typing in the box, ...
    (microsoft.public.access.formscoding)
  • Re: Coding Issue
    ... the AfterUpdate event only executes after the typing ... Private Sub Overall_Classification_AfterUpdate ... IngColor = 255 ...
    (microsoft.public.access.formscoding)
  • Re: Word equals color
    ... Private Sub ColorClassification ... used on the top and bottom of 3x (tab) forms for the same record. ... the typed in information updates and only the first form ... classification info to get the back color to update. ...
    (microsoft.public.access.formscoding)