I have written a oOOBasic macro that disables some form fields when a field has a particular value.
I can execute the macro when the trigger field is changed, but I need to execute it when moving between records, as the trigger field value varies between records.
Is there a way to execute macros other than directly from a form field?
[Solved] Execute Macro when Moving Between Records in a form
[Solved] Execute Macro when Moving Between Records in a form
Last edited by Ant on Wed Feb 25, 2009 5:06 am, edited 2 times in total.
OOo 3.0.X on Ms Windows XP + MS Windows Vista
-
- Volunteer
- Posts: 283
- Joined: Tue Dec 04, 2007 6:38 pm
- Location: Houston, TX
Re: Execute Macro when Moving Between Records in a form
There are various form events (look at the events tab of the form's properties dialog). For what you need you can use the Before/After Record Change events.
Re: Execute Macro when Moving Between Records in a form
Thanks, I finally found where I could access the form properties.
But which event occurs when you move between records? I've tried all the options and none seem to work.
When loading works when you first bring the form up, but not when you change records.
Record action (what is that?) doesn't work, Record change is no good as I want to prevent a record change.
Fill parameters (whatever that mans) doesn't work.
surely oOOBase has a way of triggering a macro when a record changes, I can think of a million uses for such functionality.
But which event occurs when you move between records? I've tried all the options and none seem to work.
When loading works when you first bring the form up, but not when you change records.
Record action (what is that?) doesn't work, Record change is no good as I want to prevent a record change.
Fill parameters (whatever that mans) doesn't work.
surely oOOBase has a way of triggering a macro when a record changes, I can think of a million uses for such functionality.
OOo 3.0.X on Ms Windows XP + MS Windows Vista
Re: Execute Macro when Moving Between Records in a form [solved]
Through trial and error I have found the solution:
Use After Record Change event.
For others, to get to forms properties look for a toolbar icon (left side near top on my screen) that looks like a form with slider bar on top of it.
Use After Record Change event.
For others, to get to forms properties look for a toolbar icon (left side near top on my screen) that looks like a form with slider bar on top of it.
OOo 3.0.X on Ms Windows XP + MS Windows Vista