Johannes ,

On very FormControl or on the Form itself, you can put "events" who call a macro. Thre are a lot of available events who can are covering all your needs as "Prior to reset", "After reset", "Before updating", "After Updating" ......

Hope it helps

Fernand
Hi! (Sorry if this doesn't fit apidev-list but no other suitable list seems
to be active.)

Q: How can I put some kind of trigger/listener that runs a macro whenever
the user changes to another Base Form record ?

I'm making an Invoice system in Base (have checked others' OOo invoice
systems, not what I need).

Every invoice goes into a database row, database is very simple, no foreign
keys even. I've made a "WYSIWYG" Form with Formatted Fields whose Data
Fields are linked to columns in the database. These fields are used for
inputting new data and the entire form is printed. It will be used by people
not very skilled with computers (not programmers).

I need to make each individual record (invoice stored in the database)
lockable, that is, it shouldn't be possible to change any data in an invoice
after it has been locked. It is enough if it is locked from editing via the
Form, it doesn't have to be "really locked" in the database. It's mostly to
prevent accidental editing.

What I think I need is to have a function called every time a new record is
loaded via the navigation bar or other means, this function checks a
"locked" field for the current record and sets every input field's ReadOnly
parameter to Yes.

How can I put some kind of trigger/listener that runs a macro whenever the
user changes to another form record?

Would prefer a StarBasic solution even if ugly (I'm an old QBasic geek...).

Thanks /J



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to