Posted: Thu Aug 02, 2007 9:30 am Post subject: Combo box with fixed set of values in db form?
I'm importing some databases from AppleWorks to NeoOffice. One thing I haven't been able to figure out is how to get the same behavior from combo boxes in NO. In AppleWorks/Filemaker its easy to set up a pop-up menu from which the user can select one of a set of predefined values. How do you do this in NeoOffice? Do I need to make a whole separate table? Does that separate table need to be in its own file? I was expecting to have at least one mode where I just type in a list of possible values without needing to understand SQL expressions. (FWIW, I have the AppleWorks db imported into NeoOffice as an ASCII text spreadsheet, and made the spreadsheet the data source for the new db.)
Joined: Feb 18, 2007 Posts: 239 Location: LaLaLand
Posted: Thu Aug 02, 2007 10:46 am Post subject:
This is not a function I've used; however I did a search through the NeoOffice Help for "Combo Boxes" and there are several sections of use outlined there.
Posted: Thu Aug 02, 2007 11:26 am Post subject: User guide not giving me the answer
Thanks!
It looks like I need to use a list box... but the user guide isn't helping me, because I don't understand the terminology, or the underlying model.
Let's take this a step at a time:
> The List Box wizard opens.
OK, I got that.
>4. On the first screen, Table Selection, click Types. This is the table that contains the data for the list box.
This seems to mean that I need to set up a whole other database just to provide the values for this list box... Is that right? I don't understand this... it seems incredibly heavy handed. Can't I just type a list of values in somewhere? I'm using a spreadsheet as my data source, and I don't see any way to add more tables to it. I only have one database, so that's my only choice in this first screen. I select it and move on...
>5. Click Next.
OK.
>6. On the second screen, Field Selection, click TypeName. This is the field
containing the display text for the list box entries. Its name appears now in the Field from the List Table box.
I think I understand this... This means "pick the field that I actually want to display/edit, right?"
>7. Click Next.
OK
>8. On the third screen, Field Link, in the Field from the Value Table list, click Type and, in the Field from the List Table list, click ID. The names appear in their respective boxes without the need for typing in. This creates the link between the key value that underlies the displayed value and the field that the value is written to.
I have absolutely no idea what this is talking about. Help? I don't want to "link" anything... I just want to cram a value into a field in my db field when the user makes a selection.
Maybe this would all make more sense if I was using a "real" database as my back-end instead of a spreadsheet... But this does all seem like pulling teeth for something that should be pretty simple.
Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
Posted: Thu Aug 02, 2007 2:28 pm Post subject:
For either a list or a combo box, you do need a table of values.
If you want to continue to use your database by connecting to the spreadsheet, you need to create a new sheet in the spreadsheet document. In the sheet, create the list of values you need. Be sure to give the sheet an easily identifiable name. It will then show up as a separate table in the related .odb file.
You could also opt to import the data from the spreadsheet into the database document, meaning that you could add tables directly from the database document. To do that, you would need to create a new database document, and follow the instructions in this tutorial in the wiki. Then you would add another table for the values.
Which ever way you choose, I think I would opt to create the table and the linkages by hand, rather than using the wizard.
As I understand it (I've not used a combo box yet), when you create the form, you can set the field properties to the combo box. More info on that should be in the help.
Eventually, that process will be part of the tutorial series I referred you to. I'm making a birding database in Base and writing a tutorial as I go. But I haven't gotten to the combo box piece yet, and I don't know when I will.
Posted: Fri Aug 03, 2007 12:13 am Post subject: Crash a rama
Hey Lorinda,
Thanks so much for that advice. Your tutorial helped a lot in my understanding of what I'm doing. I have my data imported into the db, and my list boxes are working as expected. I hit a couple of bugs along the way, so I guess I should post those in another forum.
Here's another quick questions you might be able to answer:
Is there a way to display multiple entries in a form? I can only see one at a time.
Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
Posted: Fri Aug 03, 2007 5:04 am Post subject: Re: Crash a rama
Glad to be of help. It's good to know that my tutorial is being used.
graxspoo wrote:
Is there a way to display multiple entries in a form? I can only see one at a time.
If you use the form wizard (and here I would do that rather than create the form by hand), one of the options in step 5 (Arrange Controls) is a spreadsheet like set up. I'm pretty sure that one lets you view multiple records at a time.
Joined: Jun 20, 2006 Posts: 2051 Location: Midwest, USA
Posted: Fri Aug 03, 2007 5:09 am Post subject:
I forgot to post a link I meant to. Solveig Haugland has an article on using the form wizard that's very good. It is for OpenOffice.org, but since NeoOffice uses the OpenOffice.org code base, the instructions work for Neo, too. Just remember that a right click is the same as a control-click, and that the control key in a windows enviroment is replaced by the command key on a Mac.
Solveig's articles are all quite good. I often google "Solveig Haugland" plus a keyword or two if I have question about Base. (This time I used "Solveig Haugland Base Form") So far it's been for articles I know I've seen before, but it works well.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum