VB+access中出现了问题,高手帮忙。
我用3个ADODC连接1一个库,用3个DATAGRID显示其中的字段,添加的时候用TEXT没问题,修改的时候说找不到字段。
程序代码:Private Sub Cmd_Modi_Click()
'初始化编辑车间生产日报信息
编辑车间生产日报.lblDate = Format(DtCheckDate.Value, "yyyy-mm-dd") '日报日期
编辑车间生产日报.OriEmpId = Adodc1.Recordset.Fields(21) '产品编号
UpperEmp.EmpId = 编辑车间生产日报.OriEmpId
UpperEmp.GetInfo (UpperEmp.EmpId) '读取选择产品的信息
编辑车间生产日报.ComboEmp = UpperEmp.EmpName '产品名称
编辑车间生产日报.txtyy1yl = Adodc1.Recordset.Fields(22) '原药1用量
编辑车间生产日报.txtyy2yl = Adodc1.Recordset.Fields(23) '原药2用量
编辑车间生产日报.txtyy3yl = Adodc1.Recordset.Fields(24) '原药3用量
编辑车间生产日报.txtjgl = Adodc1.Recordset.Fields(25) '加工量
编辑车间生产日报.txtyll = Adodc1.Recordset.Fields(26) '用料量
编辑车间生产日报.txtrcl = Adodc1.Recordset.Fields(27) '日产量
编辑车间生产日报.txtrkl = Adodc1.Recordset.Fields(28) '入库量
编辑车间生产日报.txtMemo1 = Trim(Adodc1.Recordset.Fields(29)) '备注
编辑车间生产日报.txtbz_jg = Trim(Adodc1.Recordset.Fields(30)) '加工班组
编辑车间生产日报.txtbzh_jg = Trim(Adodc1.Recordset.Fields(31)) '加工班长
编辑车间生产日报.txtyy1mc = Trim(Adodc1.Recordset.Fields(32)) '原药1名称
编辑车间生产日报.txtyy2mc = Trim(Adodc1.Recordset.Fields(33)) '原药2名称
编辑车间生产日报.txtyy3mc = Trim(Adodc1.Recordset.Fields(34)) '原药3名称
编辑车间生产日报.txtyy1pc = Trim(Adodc1.Recordset.Fields(35)) '原药1批次
编辑车间生产日报.txtyy2pc = Trim(Adodc1.Recordset.Fields(36)) '原药2批次
编辑车间生产日报.txtyy3pc = Trim(Adodc1.Recordset.Fields(37)) '原药3批次
编辑车间生产日报.txtpc_jg = Trim(Adodc1.Recordset.Fields(38)) '加工批次
编辑车间生产日报.txttlpc = Trim(Adodc1.Recordset.Fields(39)) '投料批次
编辑车间生产日报.txtclpc = Trim(Adodc1.Recordset.Fields(40)) '出料批次
编辑车间生产日报.txtcll = Adodc1.Recordset.Fields(41) '出料量
编辑车间生产日报.txtclhl = Adodc1.Recordset.Fields(42) '出料含量
编辑车间生产日报.txtclsl = Adodc1.Recordset.Fields(43) '出料收率
编辑车间生产日报.txtbz_sc = Trim(Adodc1.Recordset.Fields(44)) '生产班组
编辑车间生产日报.txtbzh_sc = Trim(Adodc1.Recordset.Fields(45)) '生产班长
编辑车间生产日报.txtbz_bz = Trim(Adodc1.Recordset.Fields(46)) '包装班组
编辑车间生产日报.txtbzh_bz = Trim(Adodc1.Recordset.Fields(47)) '包装班长
编辑车间生产日报.txtmemo2 = Trim(Adodc1.Recordset.Fields(48)) '包装备注
编辑车间生产日报.txtmemo3 = Trim(Adodc1.Recordset.Fields(49)) '生产备注
编辑车间生产日报.txtryys = Trim(Adodc1.Recordset.Fields(50)) '人员因素
编辑车间生产日报.txtsbys = Trim(Adodc1.Recordset.Fields(51)) '设备因素
编辑车间生产日报.txtwlys = Trim(Adodc1.Recordset.Fields(52)) '物料因素
编辑车间生产日报.txtzdys = Trim(Adodc1.Recordset.Fields(53)) '制度因素
编辑车间生产日报.txthjys = Trim(Adodc1.Recordset.Fields(54)) '环境因素
编辑车间生产日报.txtrkpc = Trim(Adodc1.Recordset.Fields(56)) '入库批次
编辑车间生产日报.txtbzgg = Trim(Adodc1.Recordset.Fields(57)) '包装规格
编辑车间生产日报.txtylpc = Trim(Adodc1.Recordset.Fields(55)) '用料批次
编辑车间生产日报.Show 1
If 编辑车间生产日报.TmpOk = True Then
ComboDep.Text = CurDep.DepName
Refresh_Check
End If
End Sub
从红色的开始一下字段都无法找到项目。[ 本帖最后由 woshiyimao 于 2010-5-8 11:19 编辑 ]







