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


Le 29/10/2011 01:00, The Wolfkin a écrit :

Hi,

I tried using the Getting Started PDF(2) but while that did help me in
creating dropdown menus. I haven't been able to populate it and in their
example it was populated with items from another table. I'm only working
with one table here. I also don't see any way to add new fields. If I wanted
to do that would I have to start over and create a new form?


If you want to add a new field to your form, then you have to open it in Form Edit mode. In your list of forms in the main ODB window, right mouse button click on your form and choose Edit (or Modify, I'm not sure of the exact term, my version of LibO is in French). This should open the form in Form Edit mode, where you can swap field control parts, add new fields etc.

If you are adding new fields, then they need to already exist in your database table first.

As for your dropdown list :
Enter Form Edit mode.
Select your control (possibly having to "Enter Group" first)
Right-mouse button click on the control and choose "Replace with"
Choose Combobox
Now right-mouse button click on your combobox control.
Choose "Control" from the context menu.
In the "List Content Type" choose SQL from the dropdown choices.
In the List Content field, enter :
SELECT "myfield" FROM "mytable", replacing "myfield" with the field you want the data to be selected from and "mytable" with the table name from which the data is taken.
Close the Control Properties window.
Save the changes to your form.
Close your form.
Double-click on your form to open it in data edit/entry mode. You should be able to now select pre-entered data from the dropdown list and additionally add new data into the same field. Just remember to save your changes before you close the form again (or just switch to another record), and the database before you close the ODB file.

Alex


--
For unsubscribe instructions e-mail to: users+help@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.