Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

macComboEntry Enter Key Behavior with Flex

Status
Not open for further replies.

MenuItem

MIS
Aug 14, 2003
11
0
0
US
Progression 7.6.400a
MSSQL 2000 SP4

Working in OE Enter Orders screenset (OE0101), our users are accustomed to saving the OE Header record with an <Enter> key stroke while in one of two "comments" fields. These are "user_def_fld_n" fields with a value list, and additional input allowed.

With no Flex project associated with the screenset, the user can save the header record with an <Enter> key stroke, but with a Flex project (even with no code), they must set the focus on another field in order to save.

Of course, this is not a show-stopper, but I'd like to honor their request, and at least understand why these field behaves differently with Flex.

I can trap the <Enter> key with a KeyUp event (IF keycode - "13" then...) but so far I'm unable to set focus on another field or use the saverec method to save the header record and move to the details tab.

So I suppose there are 2 questions:
Why does the macComboEntry behavior change with a Flex project (even with no code)?
and
How do I save the OE header record when the <Enter> key is pressed in a macComboEntry field?

TIA,

Randall

 
A field must have focus in order for you to save. My guess is that the existing code never puts focus back on the field and leaves focus on some control or other object than the field. I would try this. On the event(s) in question, add a line of code - SomeField.SetFocus - and then the enter key should work.

I don't have Progression in front of me so I cannot test the syntax nor tell you the field to use, but you get the idea. If this doesn't work post your code and I'll tinker with it later.

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Thanks for the reply, Don.

The form will not save when a macComboEntry field has focus, even if you just tab into the field without entering any data or activating the drop-down.

This is even the case with a brand-new, blank project.

Randall



 
That was my point, you need to use fieldname.setfocus in your code so it will save.

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
The code below will display a msgbox when the <Enter> key is pressed, but setfocus or other methods don't appear to work.
I'm sure I'm overlooking something obvious.
(Lines below are alternately commented out for testing purposes)

Private Sub SortCode_KeyUp(KeyCode As Integer, ByVal shift As Integer)

If KeyCode = "13" Then

MsgBox "User pressed <Enter>"
'MsgBox macForm.SortCode.Text
macForm.SortCode.SetFocus
'macForm.SortCode.Text = "TEST"
'macForm.Hold.SetFocus

End If

End Sub
 
Yes.

To be certain that the problem isn't caused by the screenset literals having been changed, I unhid a user_def_fld without a modified literal, which exhibited the same behavior. (<Enter> appears to have no effect.)
 
Is there a presave event on this screen? Again I apologize I do not have Progression in front of me.

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
I don't see one. There's a prenavigate event, but no presave...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top