Accessing form data from an event triggered macro

I cannot work out how to access form field data (read and update) from a macro that has been triggered by a form event. I’ve read a lot of the documentation and it is totally not described anywhere.

Might be this little example helps:

SUB ChangetimeSave(oEvent AS OBJECT)
	DIM oForm AS OBJECT
	DIM stStmp AS STRING
	oForm = oEvent.Source
	IF hasUnoInterfaces(oForm, "com.sun.star.form.XForm" ) THEN	
		stStmp = Year(Date) & "-" & Right("0" & Month(Date), 2) & "-" & Right("0" & Day(Date), 2) & " " & _
			Right("0" & Hour(Time), 2) & ":" & Right("0" & Minute(Time), 2) & ":" & Right("0", Second(Time), 2)
		oForm.updateString(oForm.findColumn("ChangeTime"), stStmp)
	END IF
END SUB

This macro runs here with event “Before record action”. The column of the datasource of the form will be updated with current timestamp.
Note: There are different implementations running when a event happens. You could see this by setting msgbox oForm.ImplementationName. The macro will only work with UnoInterface “com.sun.start.form.XForm”.