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

Simple Form Question?

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


Joined: 23 Sep 2007
Posts: 2

PostPosted: Sun Sep 23, 2007 8:18 am    Post subject: Simple Form Question? Reply with quote

First, I apologize for what appears to be a constantly repeated question but in all my reading on this forum and elsewhere I can't seem to find an answer to this question. Here is the set up:

Items Table - Contains Item name, and price
Transaction Table - Contains Item name, quantity, price, date, time, clerk, etc.

I'm trying to make a simple form for the Transaction Table above. The user will select the Item Name from a Combo Box on the Items table. The combo box works fine.

Once the user selects a value from the Item Name combo box I would like to lookup the price of the item in the Items Table put it in the price field of the current transaction form.

I'm embarassed to say I've been working on this for days trying various queries, macros, and native SQL with no luck. I'm sure I'm overlooking something obvious. Any guidance would be greatly appreciated.

Thanks.
Back to top
View user's profile Send private message
r4zoli
Super User
Super User


Joined: 17 May 2005
Posts: 570
Location: Budapest, Hungary

PostPosted: Sun Sep 23, 2007 10:41 am    Post subject: Reply with quote

it seems to me you have database design and normalization problem.
read:
http://www.15seconds.com/issue/020522.htm
Both table contain item name and price, and no primary keys, and no connection betwwen tables.
List box, and combo box are usable when one tanble connected to other 1:n (use one table primary key as foreinger key in other table)(Tools>Relationship...)
Back to top
View user's profile Send private message
mrspeeb
Newbie
Newbie


Joined: 23 Sep 2007
Posts: 2

PostPosted: Sun Sep 23, 2007 7:11 pm    Post subject: Reply with quote

Thanks for taking a look but I'm not looking for a DB design tutorial. I'm looking for a tutorial on accessing form fields or the current row of the table that it maps.

The item table is a list of items with a price associated with it. The price may change over time, hence the need to "copy" the "current price" into the transaction table.

There is a 1:n between the Items Table and The Transaction Table. The primary key of the Items table is the item name. The primary key of the Transaction table is a autoincrement transaction ID. I was trying to keep it simple. I just want to take a field (item name) that has already been entered in the form and retrieve the current price for that item from the Items Table and put the current price in the transaction table.
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