且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

刷新Datagrid

更新时间:2023-10-04 23:39:28




您的查询中有一个额外的单引号..


如果BillID是Numeric,则在Table中,然后给出如下的Query语句:


strQuery =" Select * FROM DetailsT WHERE BillID =" &安培; _

Val(DataList1.BoundText)


如果是Text,那么:


strQuery ="选择* FROM DetailsT WHERE BillID =''" &安培; _

DataList1.BoundText& "''"


问候

Veena
Hi,

You have one extra single quote in your query..

In the Table if BillID is Numeric, then give your Query statement like this :

strQuery = "Select * FROM DetailsT WHERE BillID = " & _
Val(DataList1.BoundText)

If it is Text then :

strQuery = "Select * FROM DetailsT WHERE BillID = ''" & _
DataList1.BoundText & "''"


Regards
Veena


我试过两种方法它仍然指向REFRESH它给我的错误是(FROM子句中的语法错误)


lee123
Well I have Tried Both Ways And It Still Points To The "REFRESH" the error it gives me is (Syntax error in FROM clause)

lee123


感谢我花了一段时间来解决这个问题我得到它的工作,我点击我的列表中的名称后,我有另一个问题,数据网格更改为该帐单,在详细信息数据库中有货币值如何在我点击后在数据网格中以货币显示它们在名字上。因为现在当表单打开时,每个账单都显示出来,我已经通过数据网格中的属性设置了货币值,而且它是货币。


但是当我点击一个名字时它会去恢复正常。我该如何改变


lee123
thanks for the response it took me awhile to figure it out but i got it working i have another question for you after i have click on a name in my list and the datagrid changes to that bill there are currency values in the the details database how do i show them in currency in the datagrid after i have click on a name. because right now when the form opens every bill is showing and i have set the currency value through the properties in the datagrid and it is currency.

but when i click on a name it goes back to normal. how do i change that

lee123