我用VB开发一个程序,textbox用data控件和Access数据库连接,要将command和它们关联起来要怎么实现
2个回答
展开全部
窗体上放置data,command,textbox控件各一个
建纯唯立数据库a,表名b,字做世培段名c
代码如下返饥:
Private Sub Command1_Click()
Data1.DatabaseName = App.Path & "\a.mdb"
Data1.RecordSource = "b"
Text1.DataField = "c"
End Sub
Private Sub Form_Load()
Command1.Caption = "连接"
End Sub
建纯唯立数据库a,表名b,字做世培段名c
代码如下返饥:
Private Sub Command1_Click()
Data1.DatabaseName = App.Path & "\a.mdb"
Data1.RecordSource = "b"
Text1.DataField = "c"
End Sub
Private Sub Form_Load()
Command1.Caption = "连接"
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询