×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

macComboEntry Enter Key Behavior with Flex

macComboEntry Enter Key Behavior with Flex

macComboEntry Enter Key Behavior with Flex

(OP)
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

 

RE: macComboEntry Enter Key Behavior with Flex

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:
www.gainfocus.biz/exceladdin.html

RE: macComboEntry Enter Key Behavior with Flex

(OP)
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



 

RE: macComboEntry Enter Key Behavior with Flex

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:
www.gainfocus.biz/exceladdin.html

RE: macComboEntry Enter Key Behavior with Flex

(OP)
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
 

RE: macComboEntry Enter Key Behavior with Flex

What is SortCode?  One of the user defined fields?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports.  Check out our Macola tools:
www.gainfocus.biz/exceladdin.html

RE: macComboEntry Enter Key Behavior with Flex

(OP)
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.)
 

RE: macComboEntry Enter Key Behavior with Flex

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:
www.gainfocus.biz/exceladdin.html

RE: macComboEntry Enter Key Behavior with Flex

(OP)
I don't see one. There's a prenavigate event, but no presave...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close