| View previous topic :: View next topic |
| Author |
Message |
djib Newbie

Joined: 10 Dec 2005 Posts: 3
|
Posted: Sat Dec 10, 2005 3:59 am Post subject: Displaying Author in AuthorID field... |
|
|
Hello,
I am creating a database with let's say books and author.
How can I ask for the book table to display author names instead of author's ID...
How can I create a form where when adding a new book, I can select the author name from a combo box or add a new one if it is not there ?
I know all this is possible with Microsoft Access, so I'm sure they are in OOo Base...
Thanks. |
|
| Back to top |
|
 |
djib Newbie

Joined: 10 Dec 2005 Posts: 3
|
Posted: Fri Dec 16, 2005 8:23 am Post subject: |
|
|
| up ? |
|
| Back to top |
|
 |
DrewJensen Super User


Joined: 06 Jul 2005 Posts: 2616 Location: Cumberland, MD
|
Posted: Fri Dec 16, 2005 8:30 am Post subject: |
|
|
A combo box or list box will always display the first column in the rowset that is feeding the internal list.
In the case of the listbox you can have multiple columns in this row set, display the first but store the data from a different column to the target field. For a combobox the displayed value is what will be stored in the target field.
As for adding a new value to the selection list's supplier table I put up some code on how to do this a good while back. I will see if I can find it and send along the link to the thread it is posted in. You need to use a basic macro for this.
Drew _________________ Blog - http://baseanswers.spaces.live.com/ |
|
| Back to top |
|
 |
djib Newbie

Joined: 10 Dec 2005 Posts: 3
|
Posted: Fri Dec 16, 2005 1:00 pm Post subject: |
|
|
I will try to make it work with list box then.
Cheers. |
|
| Back to top |
|
 |
DrewJensen Super User


Joined: 06 Jul 2005 Posts: 2616 Location: Cumberland, MD
|
Posted: Fri Dec 16, 2005 1:15 pm Post subject: |
|
|
Well, I can't find the thread on the forum for using a listbox and automatically adding a new selection typed into the text box, to the underlying table source.
I do have the actual code and the example form. The actual ODB file was created back under build 1.9.xxx and the event links on the forms get really mangled when opened in 2.0.1 RC4 (arrrrgh)
If this is something you want to explore let me know and I will clean it up for the current build and put it up for you.
Drew _________________ Blog - http://baseanswers.spaces.live.com/ |
|
| Back to top |
|
 |
|