Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


Please correct me if I'm wrong, and if there's a better place to ask, let
me know.

It is my understanding (experimentally verified) that the PriorToReset
event will fire when a new database row is produced for data entry. Inside
this event, I can use the passed in event object to get the Form and from
the form get at the elements of the form.

I named my sub the same as the event it relates to.

Sub PriorToReset(event)
dim Form
dim DateField
Form=event.source
DateField = Form.getByName("Date")

Now I can drop a date into the "Date" field via :
DateField.setPropertyValue("Text",
​"01/04/2015"​
)
​
That date shows up on the screen as though I had keyed it in by hand. Great
so far.


Once I fill out the remaining fields manually, and an attempt is made to
send the data to the database, an error shows up asking to fill in the
mandatory "Date" field. I'm looking at it filled in exactly as I want it,
but somehow the system thinks it's not filled in. If I focus the date field
and backspace over the last digit (5) and then re enter 5 and hit enter,
and then attempt to save the record, it works. Why?

​Why can I see the date field filled in exactly as I want it, but somehow
the system thinks the field is empty or somehow invalid until I touch the
field and tinker with its last digit. If I set the last digit to 9, for
example, a database row is stored with 01/04/2019 in it as expected.

-- 
Bill Gradwohl

-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.