Hi,
I have a form for creating a new database record for a list of "components".
One button "add_component" adds a new record.
One text input "component_input" allows you to enter in the "name" of the component.
One button "save_component" saves the record.
The component_input and save_component have their default "enabled" property set to "No" in their properties list.
I only want the component_input and save_component form objects to be enabled once the "add_component" button has been clicked. Once the "save_component" button is clicked, I want them to return to being disabled. This will prevent any accidental over-writing of records.
I have used "build event" for the "add_component" button...
Code:
if [macroError] <> 0 then
## errorMessage here ##
else
setProperty
control name: component_input
property: enabled
value: True
setProperty
control name: save_component
property: enabled
value: True
end if
And then I have used "build event" for the "save_component" button...
Code:
if [macroError] <> 0 then
## errorMessage here ##
else
setProperty
control name: component_input
property: enabled
value: False
setProperty
control name: save_component
property: enabled
value: False
end if
Now, this works when add_component is first clicked, however when I click save_component neither component_input or save_component become disabled again.
Any idea where I'm going wrong?
Cheers!