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

creating complicated forms

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


Joined: 08 Feb 2010
Posts: 16
Location: cambridge

PostPosted: Mon Mar 01, 2010 2:55 am    Post subject: creating complicated forms Reply with quote

ok heres the deal.

i need to create a form for booking in a product.

it needs to be simply enter the barcode of the product and the quantity coming in.

however instead of changing the record i need the form the add the number.

e.g the count is 10, book 10 in, makes the count 20.

however i also need the form to store what is booked in in another table.

this table is a record of everything that is booked in and the date it came in etc.
(this is for the auditors when they come in)

does anybody know what i need to do to get the information into both forms with a single click of a single button.
Back to top
View user's profile Send private message
RPG
Super User
Super User


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

PostPosted: Mon Mar 01, 2010 3:51 am    Post subject: Reply with quote

Hello

You can do it on two ways
a) writing macros
b) using the method of Villeroy.

Writing macros
When you want use macros then you have to study the basic tutorial about programing and have also to understand how the programming model is of th OOo API. How better you understand the programming model how less difficult it is.

Methode of Villeroy
Villeroy have given a lot of example in which he explain how to use the forms for programming. This is also difficult but give a better result in a shortertime.

The most example of Villeroy are on the other forum but you cn also find them here.

I think before making a choice do read the posts of Villeroy.

Romke
Back to top
View user's profile Send private message
MSPhobe
Super User
Super User


Joined: 29 Sep 2005
Posts: 529
Location: England

PostPosted: Tue Mar 09, 2010 6:27 am    Post subject: Reply with quote

Another approach would be to keep a table of "ins" and "outs", and as needed, run a query which would calculate on the fly the current stock levels.

Say you have a shop selling just one sort of hammer, one sort of saw and one sort of knife.

Your InOut table might look like this. There'd be a date column, too. h,s,k codes for hammer knife saw....

10 h
5 s
5 k
-3 s
-1 k
-4 h
-1 k
8 h

.... that would show initial stock levels of 10, 5 and 5, then the sale of 3 saws, of 1 knife, 4 hammers, another knife, and a re-stock of 8 additional hammers...

Leaving your current stock levels at, if my hasty arithmetic is right...

14 h
2 s
3 k

This may not be the "human intuitive" way to do it, but I manage my stock market investments with a similar system. The only "record" I have of how many shares I hold in a particular company is in a computer generated ink-on-paper report, which I re-run from time to time when manuscript revision get too plentiful. That report tallies all the purchases and sales of each stock and tells me the current net. Has worked for 19 years so far.
Back to top
View user's profile Send private message
pydeeny
General User
General User


Joined: 08 Feb 2010
Posts: 16
Location: cambridge

PostPosted: Tue Mar 09, 2010 7:16 am    Post subject: Reply with quote

thanks but i have tried queries they created more problems than they solved.

for some reason when i run the query it adds them up correctly but then multiplies it by how many records there are.

e.g 10 in
10 in

should make 20 but instead i get 40.

i did it twice as there are two types of stock i need to take care of. for some reason one adds up correctly and the other multiplies them.
after deleting and redesigning all the tables and queries involved the same thing still happened.

also i could not manage to get other queries to run on the results of that query.
e.g an item added up to ten. but that was below the chosen replen. level it would be re-ordered.

i believe i have a workaround using a form and subform. the only difference is that the count will have to be changed manually rather than just added on.

thanks for the help anyway though
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