多种产品类型的表布局 [英] Table layout for multiple product types

查看:77
本文介绍了多种产品类型的表布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

帮助!请....这一切都很顺利,但后来我不得不在我的数据库设计中添加一些新的产品类型...


我的系统的(大部分)是基于TIRES的库存控制/销售等。有许多不同类型的轮胎,但这些类型的所有领域自然是相同的。现在我必须在系统中添加电池和额外的一些服务(穿孔,轮胎拆卸,轮胎安装)。


我只需创建一个batteryProduct表和一个nonTyre产品表,但是当我试图更新我的销售点和购买表格时,这没有用。


我认为问题是表格布局。 ''FishVal'试图通过建议添加小''加入''(?)表来帮助,但我不能完全理解他的概念。有人可以帮忙吗?这次真让我难过!


谢谢大家,


StonwardR: - (

Help! Please....it was all going so well, but then I had to add some new product types to my database design...

The (vast) majority of my system is based around the stock control/sales etc of TYRES. There are a number of different CATEGORIES of tyres, but all the fields for the types are naturally the same. Now I have to add batteries and an additional few SERVICES (punctures, tyre-removal, tyre-fitment) to the system.

I simply created a batteriesProduct table and a nonTyre product table, but this hasn''t worked when I tried to update my point of sale and purchase forms.

I think the problem is the table layout. ''FishVal'' has tried to help by advising adding small ''joining''(?) tables, but I can''t quite grasp his concept. Can anyone help? This has really got me stumped this time!

Thanks Guys,

StonwardR :-(

推荐答案

一种通用的方法是让一个Master产品表保存一般信息,如[ProductCode],[Price],[QtyOnHand],[VAT%]等,最后是[ProductType]。<每个产品类型都有一个链接表,其中包含用于链接的[ProductCode]以及特定于该ProductType的其他字段,如电池安培,轮胎轮胎等。

得到这个想法?


Nic; o)
One general approach is to have one "Master" producttable holding the general information like [ProductCode], [Price], [QtyOnHand], [VAT%], etc. and finally [ProductType].
Each producttype will have a linked table holding the [ProductCode] for linking and the additional fields that are specific for that ProductType, like Ampere for batteries, wheelsize for tyres, etc.

Getting this idea ?

Nic;o)


对不起Nico,我刚看到你的回复好自我。


我一直在深入研究这个问题,并找到了与你的很相似的其他灵魂(称为子类化表实体!)。我尝试了它,但它使得报价/销售/购买形式很难确定。


但是,这仍然是我的问题。目前我已经回去把它们全部放在一张桌子上,并且在某些情况下只是忍受不使用很多字段。


你知道,有必要能够在一张发票或报价上有(比如说)每种产品类型中的一种。这是一个可以锻炼的猪!!


任何进一步的帮助都是非常感激和拼命抓住的!


Stonward。
Sorry Nico, I''ve only just seen this reply by your good self.

I''ve been digging deeply into this problem and have found other soultions that are much the same as yours (known as subclassing the table entities!). I tried it but it made making quotation/sales/purchasing forms very difficult to figure.

However, this is still a problem I have. Currently I''ve gone back to lumping them all together in one table and simply putting up with not using many fields in some instances.

It is necessary, you see, to be able to have (say) one of each product type on ONE invoice or quotation. This is a swine to work out!!

Any further help is gratefully and desperately grasped at!!

Stonward.



对不起Nico,我刚刚看到你的善良自己的回复。


我一直在深入研究这个问题,并找到了与你的很相似的其他灵魂(称为子类化表实体!)。我尝试了它,但它使得报价/销售/购买形式很难确定。


但是,这仍然是我的问题。目前我已经回去把它们全部放在一张桌子上,并且在某些情况下只是忍受不使用很多字段。


你知道,有必要能够在一张发票或报价上有(比如说)每种产品类型中的一种。这是一个可以锻炼的猪!!


任何进一步的帮助都是非常感激和拼命抓住的!


Stonward。
Sorry Nico, I''ve only just seen this reply by your good self.

I''ve been digging deeply into this problem and have found other soultions that are much the same as yours (known as subclassing the table entities!). I tried it but it made making quotation/sales/purchasing forms very difficult to figure.

However, this is still a problem I have. Currently I''ve gone back to lumping them all together in one table and simply putting up with not using many fields in some instances.

It is necessary, you see, to be able to have (say) one of each product type on ONE invoice or quotation. This is a swine to work out!!

Any further help is gratefully and desperately grasped at!!

Stonward.



拥有主人 table和ProductType子类表格,在你的表格上并不难,只要你使用每个子类的选项卡控件即可。表。然后,该选项卡将保留ProductType,子表单将链接到Master。表由唯一的MasterProductID组成。

主人 tablefields将显示在tabcontrol上方并且始终对用户可见。


在报表上,您需要为每个ProductType使用不同的子报表,但首先在producttype上对它们进行排序也可以以合适的方式安排。


当您使用Mastertable with empty fields时解决方案,您仍然可以使用tabcontrol对字段进行分组,并仅显示与Masterrecord的ProductType相关的选项卡。 (只是让所有其他标签不可见)


掌握标签控制方法 ?


Nic; o)

Having a "Master" table and ProductType "subclassed" tables, isn''t hard on your forms, as long as you use a tabbed control per "subclass" table. The tab will then hold the ProductType and the subform is linked to the "Master" table by the unique MasterProductID.
The "Master" tablefields will show above the tabcontrol and are always visible for the user.

On a report you''ll need to use per ProductType a different subreport, but by first sorting them on producttype this can be arranged in a decent way too.

When you use the "Mastertable with empty fields" solution, you''ll still be able to use the tabcontrol to group the fields and only show the tab that''s related to the ProductType of the Masterrecord. (Just make all other tabs invisible)

Grasping the "tab control approach" ?

Nic;o)


这篇关于多种产品类型的表布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆