2个回答
展开全部
在你那个扫描编辑框中的(键按下)换行键事件下
if (key=13)then
begin
U_sjmk.adosjzj4.Append;
U_sjmk.adosjzj4.FieldByName('条码').Value :=edit3.Text;
U_sjmk.adosjzj4.FieldByName('型号).Value :=edit23.Text;
U_sjmk.adosjzj4.FieldByName('数量').Value :=edit24.Text;
U_sjmk.adosjzj4.FieldByName('时间).Value :=date;
U_sjmk.adosjzj4.Post;
end;
在界面放几个EDIT组件,
写上述代码;
把U_sjmk.adosjzj4.换成你那个ADO组件的名称;
扫描qiang动作后,你那网格中就有数据了.
if (key=13)then
begin
U_sjmk.adosjzj4.Append;
U_sjmk.adosjzj4.FieldByName('条码').Value :=edit3.Text;
U_sjmk.adosjzj4.FieldByName('型号).Value :=edit23.Text;
U_sjmk.adosjzj4.FieldByName('数量').Value :=edit24.Text;
U_sjmk.adosjzj4.FieldByName('时间).Value :=date;
U_sjmk.adosjzj4.Post;
end;
在界面放几个EDIT组件,
写上述代码;
把U_sjmk.adosjzj4.换成你那个ADO组件的名称;
扫描qiang动作后,你那网格中就有数据了.
更多追问追答
追答
关闭了再去赋值,错的吧,真看不懂你的代码.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询