我的数据库有问题 [英] Problem with my database
问题描述
嗨伙计们,谢谢你的期待。我有一个数据库,可以删除订单详细信息。
每个客户在价格表中都有自己的priceid,这是由于操作要求。组或行折扣字段不好。
我自创建我的价格表后,我无法访问添加订单详细信息子表单来选择我的产品,并且有价格。
我为产品组合设置AddOderDetailsSubform'的Rowsource为:: p
SELECT DISTINCTROW Products.ProductID,Price.Price
FROM产品INNER JOIN价格ON Products.ProductID = Price.ProductID
WHERE(((Price.CustomerID)= [Forms]![添加订单和详细信息]![CustomerID]) )
ORDER BY Products.ProductName;
在控件的After Update事件中我放了
:eek:
Me.Price = Me.ProductID.Column(2)
我现在收到一个错误,其中添加订单详细信息子窗体不起作用,我一直收到一个sql错误说明后的值结束。
我对sql / vb一无所知,我检查了VB窗口中的所有表格但是在结束子后找不到任何数据。
我在真正的泡菜在这里伙计们,我会一直待在这里,直到我整理它。
我期待着您的回复。
问候
Mark
您的陈述应为:
Me!Price = Me!ProductID.Column(1)
你发布的两列你不是很清楚,但我相信你应该把第1列称为Me!roductID.Column(0)第2列为我!ProductID.Column(1)
您的陈述应为:
Me!Price = Me!ProductID.Column(1)
我改变了,谢谢你的帮助。
我发现当我进入我的添加订单详细信息表单时,我会继续获得有关参数值的方框,我不知道为什么。
我认为数据库很复杂,你能看看并告诉我我需要做什么。
当你无法识别它们时试图找出错误证明是一场噩梦
谢谢
马克
。
确定首先查看记录源并验证您可以打开它而没有任何问题。然后确保该表单上的控件具有与recordsource中的字段匹配的控件源。希望这会有所帮助。
Hi folks, thanks for looking. I have a database that takes down order details.
Each customer has there own priceid in the price table, this is due to an opertaional requirment. A group or line discount field is no good.
I Since creating my Price table I cannot acces the add order details subform to choose my products, and there prices.
I set the AddOderDetailsSubform''s Rowsource for the Products combo to be::p
SELECT DISTINCTROW Products.ProductID, Price.Price
FROM Products INNER JOIN Price ON Products.ProductID = Price.ProductID
WHERE (((Price.CustomerID)=[Forms]![Add an Order and details]![CustomerID]))
ORDER BY Products.ProductName;
In the After Update event of the control I put
:eek:
Me.Price = Me.ProductID.Column(2)
Im now getting an error where the Add order details subform is not working, I keep getting an sql error saying value after end.
I know nothing of sql/vb, I checked all the forms in the VB window but could not find any data after the end sub.
I am in a real pickle here guys and will be on here all night till I sort it.
I look forward to hearing from you.
Regards
Mark
You have two columns you post isn''t very clear but I do believe that you should be referencing column 1 as Me!roductID.Column(0) Column 2 as Me!ProductID.Column(1)
Your statement should read:
Me!Price = Me!ProductID.Column(1)
You have two columns you post isn''t very clear but I do believe that you should be referencing column 1 as Me!roductID.Column(0) Column 2 as Me!ProductID.Column(1)
Your statement should read:
Me!Price = Me!ProductID.Column(1)Hi I changed that thank you for the help.
What I have found is that when I go into my add order details form I keep getting boxes that as for a parametor value, im dont know why.
I think the db is complex, can you take a look and tell me what I need to do.
Trying to find errors when you cant identify them is proving a nightmare
Thanks
Mark
.
O.K. first look at the recordsource and verify you can open that with no issues. Then make sure the controls on that form have a control source that match up with the fields in the recordsource. hope this helps.
这篇关于我的数据库有问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!