Hi Tony, > I have a form built by the OOo 2.0 wizard from a Mysql table; it contains > text > box controls linked to all the database fields. If I change the value of a > control by typing, the new value gets correctly written to the database. > However, if I change the value from within a Basic macro, the update does not > get performed. Obviously there is something else I need to do; any idea what?
How exactly did your macro look like? There are various possibilities how you could write some value to either the control, the control model, or the actual bound field, and all will *look* the same in your form - a new value visible in the control. However, they differ in how the form controller logic handles them. > I did try setting the form's 'IsModified' property to TRUE, but then I got an > 'Error writing to database' message, to the effect that the 'KeyName' field > was empty. KeyName is the name of the primary key field, and of course did in > fact contain a value. (This was not the field modified by the Basic code). Not sure about this one - I assume you were modifying an existing record? Or adding a new one? In any way, tampering with the IsModified property directly is not a good idea, except when you reset it to FALSE after you did some on-new-record initializations. Ciao Frank -- - Frank Schönheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Database http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
