帮我看一下 哪里出错了 谢谢 出错说找不到cpbm
Dim dr As Row
dr = Tables("货品").current
DataTables("货品目录表").SQLDeleteFor("产品货号='" & dr("货号") & "'")
DataTables("货品目录表").RemoveFor("产品货号='" & dr("货号") & "'")
Dim nms() As String = dr("颜色").Split(",")
Dim nms2() As String = dr("尺码").Split(",")
For Each name As String In Nms
For Each name2 As String In Nms2
''读取颜色和尺码的编码 用于定义产品编码
Dim dr1 As DataRow= DataTables("颜色").SQLFind("名称 ='" & name & "'") '找出编号为03的产品
Dim dr2 As DataRow= DataTables("尺码").SQLFind("名称 ='" & name2 & "'") '找出编号为03的产品
If dr1 IsNot Nothing And dr2 IsNot Nothing
Dim cpbm As String=dr("货号")&"-"&dr1("编码")&"-"&dr2("编码")
End If
msgbox(cpbm)