Listbox Question

Just as well I have modified my previous sample. This takes into account multiple selections. Take a look at it, notice I have changed the structure of the TblMaterials table.

Choose Docket No 83 when you open up form 2

That really gets me on the way David, Thanks very much, I only don't know how to make the category and material visible on the form Touchscreen, everything I try results in a blank form with nothing on it.. Like the SQL source is corrupt, would you have a hint??
 

Attachments

Have made the changes you need.

TxtDocketNo was not bound to the docket number
 

Attachments

Have made the changes you need.

TxtDocketNo was not bound to the docket number

What can I say, other then where would I be without all* your help. However some questions remain. What would be the best way to also record the full and empty weight of each material as well as buy or saleprice, this way I only have one total weight for say 3 materials and second I think I need a re-query, at this moment the combobox shows the same values for each docket..


* All = David's and everybody who helped on this wonderful board..
 
Last edited:
What happens when you double click on the material type is that it opens the categories form with the options pasted to the captions and the id's copid to the tag property, as you have discovered. When you click on the corresponding button it checks for duplicates in the TblDocketMaterials table and if not found it adds it to the table.

It records the following information

Docket Id
Material ID
Category ID

All foreign keys related back to the lookup tables.
It alo refreshes the combo on the touchscreen form to reflect the changes made. No if you want to store additional information relating to the specific entry you will need to add those fields to the table and work out a way of populating the data. You could invoke an additional popup form to request the information. It's what suits your best practice menthod.

So the route would be

Touchscreen > Materials > Additional info > Touchscreen.

Edit:
record the full and empty weight of each material as well as buy or saleprice

Normally one would use the default values fom the materials table however as prices change periodically this would not suffice historically, therefore this would be an occassion where normally calculated/derived fields as stored in a table. Some may say denormalised, however in this instance this is not the case.

Then if you want to work out the total weight of materials for the whole docket you simply sum the weight field in the TblDocketMaterials tabel for a specific docket number. This weight would be in total irrespective of mateial type.
 
Last edited:
What happens when you double click on the material type is that it opens the categories form with the options pasted to the captions and the id's copid to the tag property, as you have discovered. When you click on the corresponding button it checks for duplicates in the TblDocketMaterials table and if not found it adds it to the table.

It records the following information

Docket Id
Material ID
Category ID

All foreign keys related back to the lookup tables.
It alo refreshes the combo on the touchscreen form to reflect the changes made. No if you want to store additional information relating to the specific entry you will need to add those fields to the table and work out a way of populating the data. You could invoke an additional popup form to request the information. It's what suits your best practice menthod.

So the route would be

Touchscreen > Materials > Additional info > Touchscreen.

Edit:


Normally one would use the default values fom the materials table however as prices change periodically this would not suffice historically, therefore this would be an occassion where normally calculated/derived fields as stored in a table. Some may say denormalised, however in this instance this is not the case.

Then if you want to work out the total weight of materials for the whole docket you simply sum the weight field in the TblDocketMaterials tabel for a specific docket number. This weight would be in total irrespective of mateial type.

Thanks David, am I right in thinking that I could store the weights and price in the TblDocketMaterials as well, the weights from the Touchscreen and the price later via the frmpayment?
 
The Docket Material table is an extension of the docket table the only difference is that you can have many records related back to the docket. If you fel that you need to store individual weights and prices as opposed to a cummulative total then stoe them there. If however you only need a summary total then stroe them in the docket table. It is all down to how YOU want to capture the data.
 
The Docket Material table is an extension of the docket table the only difference is that you can have many records related back to the docket. If you fel that you need to store individual weights and prices as opposed to a cummulative total then stoe them there. If however you only need a summary total then stroe them in the docket table. It is all down to how YOU want to capture the data.

Thanks for the explanation David, as this is the first time in 20 years I still have lots to learn.. I would not need a cumulative total on weekly basis or so, this I would need for stock level per category, in the daily running it would be sales slips and buy receipts based on the incoming or outgoing material. In our case there will be paid a buyprice per Ton of materials. There needs to be a purchase and sales report per docket, After that I would make a daily report on buy and sales figures to see if the cash is matching, and a stock level report per category. A sales rep report will also be extracted.. So I think your first suggestion would be the right one..
 
I've got a friend in Limerick;) I used to go there quite a bit, inc Shannon, Cork, Dublin.

I Bet you flew Ryanair ;) I used to fly my friends over, since the Celtic Tiger is not roaring any more, but buried deep under the ground this has become unaffordable. Waiting for a new government.. :D
 
I Bet you flew Ryanair ;) I used to fly my friends over, since the Celtic Tiger is not roaring any more, but buried deep under the ground this has become unaffordable. Waiting for a new government.. :D
I actually always did Aer Lingus to Dublin and got taken to Limerick by car. Only flown Ryanair once. Crappy service!:D
 
I actually always did Aer Lingus to Dublin and got taken to Limerick by car. Only flown Ryanair once. Crappy service!:D

Right you are, you would like it now, motorway from Airport all the way to Limerick, nearly City Centre. Which is not blossoming any more, a lot of receiverships and liquidations.. Pub trade down by 33% but I guess we go off - topic.. :( so you can always PM me for good old times..
 

Users who are viewing this thread

Back
Top Bottom