[求助]初学者对VB开发数据库的问题
用VB开发数据库程序时,如果不用TextBox,ComboBox等这些控件做为数据输入控件,是否有如DataGrid这样的数据网格控件做为输入控件?DataGrid是否通实现这个功能?
private sub command1_click
Call IniRs
rsHz.Open
rsHz.addnew
Set dgMx.DataSource = rsMx
end sub
Sub IniRs()
'定义本地记录集
Set rsHz = New ADODB.Recordset
rsHz.Fields.Append "djh", adBSTR
rsHz.Fields.Append "rklx", adBSTR
rsHz.Fields.Append "gys", adBSTR
rsHz.Fields.Append "kflsh", adBSTR
rsHz.Fields.Append "rksl", adDecimal
rsHz.Fields.Append "rkje", adCurrency
rsHz.Fields.Append "plcj", adCurrency
rsHz.Fields.Append "cgr", adBSTR
rsHz.Fields.Append "sjh", adBSTR
rsHz.Fields.Append "zy", adBSTR
rsHz.Fields.Append "zbr", adBSTR
rsHz.Fields.Append "zbsj", adBSTR
rsHz.Fields.Append "shr", adBSTR
rsHz.Fields.Append "shsj", adBSTR
End Sub
这个代码就可以实现了