April 18th, 2017

Hello everyone

I hope everyone enjoyed their weekend. I once had a customer tell me,

‘The computer needs to work for me not me work for the computer.’

That makes perfect sense to me and I take care to ensure all forms I design address function first then form.

Today I want to look at form function and specifically object focus. An issue; well not really an issue rather annoyance; is when a button is clicked on a form and the selected field or form object loses focus. Many of you may think this is nit picky but if you are developing a form which is set for speed of data entry then it would become a real annoyance for the data entry person.   Alpha Software provides object classes one of which is

.class = button

The simple routine below can be put at the top of a button and will return focus to the previous object selected once the button is pushed. Here is the code.

If obj(topparent.active()).class() = "button" then 
    obj(topparent.active_prev()).activate()
End If

If your button is performing a form related function such as;

  • Setting the form mode to edit
  • Sorting records in an embedded browse by the selected column
  • Looking up a value from an external table
  • Popping up a dialog
  • etc

then this works great. Any code below the above routine will run then when focus is returned to the form the user is back on the original object. Cool!

As an example, maybe you are designing a form for creating deposits. On arrive of the total credit card field you could display a button which when clicked will open a dialog form allowing the addition of  credit card receipts and then post back the total to the field which has focus. It would also work well in a payroll package where you have to total employee punches. Now the reason I say to pop up a button which can be clicked is because there will be cases when the user just needs to enter the correct total and does not need the supporting detail. This design will allow them to do just that thus giving them the best of both worlds.

 

That’s all for today. If you own a business and need help with your Alpha Software program, contact us. Are rates are reasonable and our work is guaranteed.

Phone:713 417-6831

EMail: NLawson@cdc-takecharge.com