VB至尊高手请解答(VB ACCESS系统制作)

来源:百度知道 编辑:UC知道 时间:2024/09/28 08:40:46
如图 根据售票信息表 制作图示窗口 相关选择之后 单击“出售” 出售的记录会在“已售记录”里增添一条。求整个过程的代码以及安装的控件。详细过程。我现在只是做好了数据库和VB里这个窗口的界面,剩下的全是空白。如果解决此问题,追加100分!

噶,嘎嘎!

这个应该不难的啊,你的数据库部分都做好了吧!就是这段?
dim strl as string
strl=""
if combo1.text="" or combo2.text="" or combo3.text="" then exit sub
if check1.check=1 then strl="A"
if check2.check=1 then strl="B"
if check3.check=1 then strl="C"
if check4.check=1 then strl="D"
if strl="" then exit sub
dim ra as new adodb.recordset
dim rb as new adodb.recordset
ra.open "select * from 票务信息 where 日期="& combo1.text &" and 场次='"& 场次 &"' and 座位号='"& strl & combo3.text &"'",conn,1,3
if ra.eof then
ra.close
msgbox "没有找到相关信息"
exit sub
end if
conn.ex(直接执行的语句,代码忘了:() "insert into 已售记录 values("& ra("日期") &",....,"& 单价 &""
ra.delete '''是否需要删除原票务信息的记录,你自己决定是否加这条
ra.close
msgbox "出售成功!"