Do not let any software impress you!

Only let it convince your intellect.
Slider img 1
Do not look for a business paradise!

It is a waste of time.
Slider img 2
Only yourself can push you uphill.

There is no easy road to prizes.
Slider img 3
Productivity is the name of the game.

And you have to conquer it.
Slider img 4
As long as you understand it,

you will start to build your know-how.
Slider img 5
We can help with that.

We have the tools and the method.
Slider img 6

How do we use the Form_BeforeClose



When you want your code to run when you are saving your data
you use the function Form_BeforeClose.
The code is running before adding data into the database.
If you want your code to run after data are added into the database,
you use the procedure Form_End.
The example below shows the basic commands.

lib
 
 fun Form_BeforeClose()

     result = 1

     write your code (code for checking something or editing a record)
      for example, you want to check if the value
      the user enters in the field phone, has 10 digits

     f = TopForm()

     p = PByName(f;”CUSTOMER”)
     t = TByName(p;”CUSTOMER”)
    
     phn = TGetFlg(t;”PHONE”)
     phn_l = Len(phn)

      if (phn_l <> 10) then
         call message(“The phone you enter is wrong. It must have 10 digits.”)
         result = 0
         return
      endif

end