Foxtable(狐表)用户栏目专家坐堂 → [求助]数据填充的问题?


  共有9210人关注过本帖树形打印复制链接

主题:[求助]数据填充的问题?

帅哥哟,离线,有人找我吗?
lsf5138
  1楼 | QQ | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:童狐 帖子:242 积分:2235 威望:0 精华:0 注册:2011/8/16 22:33:00
[求助]数据填充的问题?  发帖心情 Post By:2012/11/5 8:13:00 [显示全部帖子]

铵钮代码如下:

If _UserGroup = "物流部" Then
    With Tables("水洗")
        If .Current IsNot Nothing Then
            If Tables("水洗").Current("确认")=False   
                With e.Form
                    If .Controls("Label5").Text = "OK" Then  '如果信息完善,则新建令号
                        Dim Filter As String
                        With e.Form.Controls("TextBox4")
                            If .Value IsNot Nothing Then
                                Filter = "生产条码 = '" & .Value & "'"
                            End If
                        End With
                        If Filter > "" Then
                            Tables("织机生产").Filter = Filter
                        End If

                            With Tables("织机生产")
                                If .Current IsNot Nothing Then

                                    Dim tr As Row = Tables("织机生产").Current()
                                    tr("水洗批次") = .Controls("TextBox1").Value
                                    tr("水洗_载货日期") = .Controls("DateTimePicker2").Value
                                    tr("水洗_单位") = .Controls("ComboBox1").Value
                                    tr.Save()

                                Else
                                    MessageBox.show("没有这条记录!")
                                End If
                            End With

                    End If
                End With
            Else
                MessageBox.show("本批次已确认完成,不可再添加!")
            End If
        Else
            MessageBox.show("目录表没有记录!")
        End If
    End With
Else
    MessageBox.show("物流部才能操作!")
End If

原代码筛选后记录如果为空,再执行数据填充会报错。我就在筛选后加个记录为空不执行的代码,不知为什么加不了,会报错!


 回到顶部