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

Help using Listbox to return 2nd field value

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


Joined: 04 Sep 2010
Posts: 19
Location: RIchmond, KY

PostPosted: Thu Sep 09, 2010 6:09 am    Post subject: Help using Listbox to return 2nd field value Reply with quote

I have a question about this form.



This list box (Products in the subform) uses an SQL statement to show the Description field from the table Products. When I select an item from the shown drop-down list of this listbox, I want to pass the Price from the Products table to the next field in this subform (Next column after the listbox).

In Access I did this with a ListBox that contained 2 fields, I can't do this in OpenOffice. I don't need to see the value first, just pass it to the Price field. I saw several posts about concatenating data & using Message Boxes to view the data. I don't need to do that.

Can anyone help me with the code or process to pass Price from table Products to the ItemPrice field in the InvoiceItems table when selecting the Product from the listbox. The subform with the listbox is based on the InvoiceItems table.

Here is my database relationship structure.



Thanks,
Kenny
Back to top
View user's profile Send private message Visit poster's website
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Thu Sep 09, 2010 8:43 am    Post subject: Reply with quote

Hello

In this post dacm explains a method how to set up a database in which you have not to calculate those values. Also you can find there a link what is pointing to an example.

Here you can find that even with an example it is difficult to do. But other people give also some explanations what can it make more easy for you.

I think you must learn the term we use in OOo-base. You talk about your form document as a subform but I think you mean the document. A subform is a part of a mainform as you see in the form navigator. A mainform is not the form document.
http://user.services.openoffice.org/en/forum/viewtopic.php?f=83&t=28235

Romke
Back to top
View user's profile Send private message
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