OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Displaying Author in AuthorID field...

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
djib
Newbie
Newbie


Joined: 10 Dec 2005
Posts: 3

PostPosted: Sat Dec 10, 2005 3:59 am    Post subject: Displaying Author in AuthorID field... Reply with quote

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
View user's profile Send private message
djib
Newbie
Newbie


Joined: 10 Dec 2005
Posts: 3

PostPosted: Fri Dec 16, 2005 8:23 am    Post subject: Reply with quote

up ?
Back to top
View user's profile Send private message
DrewJensen
Super User
Super User


Joined: 06 Jul 2005
Posts: 2616
Location: Cumberland, MD

PostPosted: Fri Dec 16, 2005 8:30 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
djib
Newbie
Newbie


Joined: 10 Dec 2005
Posts: 3

PostPosted: Fri Dec 16, 2005 1:00 pm    Post subject: Reply with quote

I will try to make it work with list box then.

Cheers.
Back to top
View user's profile Send private message
DrewJensen
Super User
Super User


Joined: 06 Jul 2005
Posts: 2616
Location: Cumberland, MD

PostPosted: Fri Dec 16, 2005 1:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group