Le 29/03/2013 20:16, Dan Lewis a écrit : Hi Dan,
> I have a form that requires first name, middle initial, and last name. > Some of the people do not have a middle initial. For such people I want > the field for the middle initial to contain an empty string. How do I > accomplish this? (For this field, I have set the Data property, "Set > empty string to NULL" to No.) Which db engine are you using ? If you are using mysql, then you can set that at the table definition level, and change the setting in the Advanced Properties of your ODB connection setup with regard to checking required values of Form data entry. If you're on hsqldb, you can define your field (in Table design mode) to have a default value of a "space" (just type the space bar in the field properties, and make data entry for that field required. If you then enter data in the table via the Table edit view, you will notice that the space gets added automatically. That way, if you then concatenate the fields, you'll get the result you're looking for. However, this will be problematic if you then insert spaces into your concatenate statement in order to separate the names from each other, as you will see a double space for all of those middle names which had no character string. You would have to adapt your SQL query to test for the presence of the Unicode space character in that field and then adapt the concatenate instruction accordingly. Alex -- For unsubscribe instructions e-mail to: [email protected] 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
