21485.html

来自「VB技巧问答10000例 VB技巧问答10000例」· HTML 代码 · 共 24 行

HTML
24
字号
<html>  <head>    <title>我的方法, 提供参考!!</title>  </head>  <body bgcolor="#FFFFFF" vlink="#808080">    <center>      <h1>我的方法, 提供参考!!</h1>    </center><hr size=7 width=75%><hr size=7 width=75%><p>Posted by James on November 20, 1999 at 12:24:24:<p>In Reply to: <a href="21475.html">Re: 请问vb是否有判断table是否存在的涵数?</a> posted by 纪文和 on November 19, 1999 at 19:21:33:<p>For Each td In db.TableDefs '如果存在的话删除资料表再新增<br>    If td.Name = Text1.Text Then<br>       Response = MsgBox("资料表已存在, 是否重写该资料表??", vbYesNo, "资料侦测处理程序", 0, 0)<br>       If Response = vbYes Then   ' 若使用者按下 [是]。<br>           db.Execute ("DROP TABLE [" + Text1.Text + "]") '删除原来的资料表<br>           db.Execute ("DROP TABLE [H" + Text1.Text + "]") '删除原来的资料表<br>           DoEvents<br>       Else   ' 若使用者按下 [否]。<br>           lblWork.Visible = False<br>           lblShow.Caption = "CANCEL"<br>           Exit Sub '摸摸鼻子离开, 甚么事也不要作<br>       End If<br>    End If<br>Next<p>程式讨论网站 http://www.awaytech.com/program.htm<br><ul><li><a href="http://www.awaytech.com/program.htm">亦崴科技程式讨论</a></ul><br><hr size=7 width=75%><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 21485--></ul><!--end: 21485--><br><hr size=7 width=75%><p></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?