Scott,

You truly are a gentleman. I tried your code out in a new project and yes it works. I place only your code in my editfield and it only beeps at me when I try to hit enter.
So heres what really goes on in my code blow by blow.
1.) In an editfield.lostfocus event it does the following and only the following. (note it is a indexed array of editfields)

        if Index = IN_NOTE Then  // this is the last editfield in my form
                display_correctEntry.Visible = True
                input_correctEntry.Visible = True
                input_correctEntry.Text = "N"
                input_correctEntry.SelStart = 0
input_correctEntry.SelLength = 1 // I could replace this with selectAll being that its available...
                input_correctEntry.SetFocus()
         End If


2.) the focus is now in a single indexed or solo editfield
it has only code in its keydown event no other place in this field has code
        which I took my code out and replaced yours Scott.
        
so I lose focus in an array of editfields whose index is IN_NOTE
this then runs code which displays a static text called display_correctEntry and editfield input_correctEntry

I then hit enter and all I get are beeps. please what else could cause the problem. RB is compiling or doing something wrong. My goal is not just to complain no but to help others because this could be a serious error. Please understand that.
And yes the ilogic is that this logic is simple and should work.

Again sorry to all those who I have insulted. I will do better from now on not to do that. My apologies.

Josh

P.S. In this again there is no outside code that could cause a problem.

Try something like this:

  // Let them type in Y/N/navigate/delete/tab
if asc(Key) = 8 or asc(Key) = 28 or asc(Key) = 29 or asc(Key) = 9 or Uppercase(Key) = "Y" or Uppercase(Key) = "N" then return FALSE

  // Otherwise check for action
  if asc(Key) = 13 and me.Text <> "" then
if Uppercase(me.Text) = "Y" then 'Note: String comparisons of this type should NOT be case sensitive
      // Do 'Yes' stuff
      Speak "Yes!"
    else
      // Do 'No' Stuff (If it ain't 'Y', then it must be 'N'!)
      Speak "No"
    end if
  end if

// If we get here, then they have not entered an allowable Key, or they are finished, no problem // so we return TRUE to ignore any other keys, or to simply stop further processing of the event
  Return TRUE


That logic is, well, perhaps a bit simpler, to me at least. :-)

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to