The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
AXFormChange doesn't work?
Posted: 10 Oct 14 3:11 AM
|
Hello, I was experimenting on how to save changes to the database on AXFormChange but before doing that, I put in a sample msgbox prompt which is put on the AXFormChange(Sender) function but, for example, on the Account Detail, on one of its tabs, when opened(or clicked in that manner), the msgbox should display, but it does not and even when I move from one Account Detail to another, still, nothing happens. How can I solve the problem? I remade the form, but to no avail. It worked a while ago then suddenly after a lot of changes made(maybe), it does not work anymore. |
|
|
|
Re: AXFormChange doesn't work?
Posted: 13 Oct 14 11:28 AM
|
First of all, make sure it's a data form (based off a table) and not a Manage form. Sounds like you have a data form since it was added as an account tab.
Second, make sure you have something bound to the form. If there's no controls bound to a database field, the change event will not fire. You could put a label, bind it to something like the table ID field, and then make it not visible for example. |
|
|
|
Re: AXFormChange doesn't work?
Posted: 13 Oct 14 5:10 PM
|
Hello sir! The form I created was surely a 'Data Form'. What I was just trying to achieve is make a msgbox appear during AXFormChange but it did not. |
|
|
|
Re: AXFormChange doesn't work?
Posted: 13 Oct 14 5:11 PM
|
Are there any bound controls on the form? If the form does not contain any bound controls the change event will not fire. |
|
|
| |
|
Re: AXFormChange doesn't work?
Posted: 15 Oct 14 7:12 PM
|
Originally posted by Kevin Yu
Hello sir, when you say bound controls you mean? In my form it only has a memoText on it :D
|
|
Is memoText bound to a database field? |
|
|
|
Re: AXFormChange doesn't work?
Posted: 15 Oct 14 7:41 PM
|
Hello sir, I did not bind it to a database field as I have set the Text Property of the control with a string. |
|
|
|
Re: AXFormChange doesn't work?
Posted: 15 Oct 14 7:42 PM
|
Originally posted by Kevin Yu
Hello sir, I did not bind it to a database field as I have set the Text Property of the control with a string.
|
|
The change event will not fire unless a control on the form is bound to a database field. If there's no data context there's nothing to change. |
|
|
|
Re: AXFormChange doesn't work?
Posted: 15 Oct 14 7:43 PM
|
Place a label on the form, set visible to false, then bind to the record ID field for the table. Then the change event will fire. |
|
|
|
Re: AXFormChange doesn't work?
Posted: 15 Oct 14 7:45 PM
|
Originally posted by Ryan Farley
Place a label on the form, set visible to false, then bind to the record ID field for the table. Then the change event will fire.
|
|
Thank you for the tip sir! :D I will try this as soon as I'm done with the task I'm currently working on! :D |
|
|
|