9858.html
来自「VB技巧问答10000例 VB技巧问答10000例」· HTML 代码 · 共 31 行
HTML
31 行
<html>
<head>
<title>Re: Help !!! </title>
</head>
<body bgcolor="#FFFFFF" vlink="#808080">
<center>
<h1>Re: Help !!! </h1>
</center>
<hr size=7 width=75%>
<hr size=7 width=75%><p>
Posted by AndyLin on February 04, 1999 at 13:55:50:<p>
In Reply to: <a href="9848.html">Re: Help !!! </a> posted by Ta on February 04, 1999 at 10:42:26:<p>
: <br>: : DBGrid is can not disign in run time <br>: : it support for design time only<p>: Following is my situation:<p>: DatabaseName: business.mdb contains tables such as<br>: customerName,Product and Transaction<p>: My form has a DBgridComboBox which displays all customer Name. when user click on different customer Name, information in textBoxes will be changed too!<p>: text1.text show customerID<br>: text2.text Show customerAddress<br>: .... <br>: ....<br>: I have already done this part. Don't worry about it!<p>: What I hope right now is when user click on<br>: Customer Name, DBGrid will show all the transactions made by this customer.<p>: <br>: SQL="select * from transaction_ <br>: where CustomerID= '" & text1.text & "'"<p>: Data1.RecordSource=SQL<br>: Data1.Refresh<p>: If DBGrid.Datasource=data1 does not work,<br>: how can I assign the final result to DBGrid?<p>when you set dbgrid.datasource=data1 in design time<p>data1.recordsource="select * from customername"<br>data1.refresh <br>'the customername data in dbgrid<br>...<br>...<br>if you code again:<br>data1.recordsource="select * from transcation where ....."<br>data1.refresh <br>'the data in dbgrid will be changed by data1,the transcation data in dbgrid now,you don't need to code:DBGrid.Datasource=data1 <br>sorry! My english is poor ,I hope you can understand.<br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 9858-->
<!--top: 9875--><li><a href="9875.html">Re: Help !!! </a> <b>Ta</b> <i>06:46:48 2/05/99</i>
(<!--responses: 9875-->1)
<ul><!--insert: 9875-->
<!--top: 9878--><li><a href="9878.html">Re: Help !!! </a> <b>AndyLin</b> <i>09:34:31 2/05/99</i>
(<!--responses: 9878-->0)
<ul><!--insert: 9878-->
</ul><!--end: 9878-->
</ul><!--end: 9875-->
</ul><!--end: 9858-->
<br><hr size=7 width=75%><p>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?