In a form, tabbing through a field produces a different result to keying Enter

In a data sheet, the code in a field’s Code panel is executed BEFORE the next field becomes active, regardless of whether I trigger that code with a Tab or with the Enter key - this is what one would expect.

In a form however, if I have, in the procedure panel of each of a number of contiguous fields, the code: message info("fieldname"), I get a different response, depending on whether I have used the Tab key or the Enter key to trigger the code. The Enter key gives the name of the current field but the Tab key responds with the name of next field along, suggesting that, in that case, the code is not executed until AFTER the next field becomes active.

Is this the way it’s supposed to work? I find it odd and a tad dangerous.

Sorry, that’s the way it has to work. It’s really difficult to intertwine Objective-C code with Panorama code in situations like this. You are correct, the code doesn’t execute until after the next field is active, so you cannot rely on info(“fieldname”) to tell you the name of the field that has just finished editing.

That’s fine - as long as I know how it works - which I definitely didn’t before and I think that, in my current very large project, I’m going to have to make a lot of changes. Better now than later.

I’m thinking about how to modify the Help entry but it’s not easy at first glance.