|
Public Function addCARGOTYPE() '添加
Dim strGongjian As String
Dim daihao As String
Dim tz As String
Dim xxfl
strGongjian = DLookup("详细分类名称", "tblgongyi", "[分类代号]='" & (lngKM) & "'")
daihao = lngKM & InputBox("明细分类代号" & lngKM & "**", "请输入代号", "**")
tz = InputBox("新设下级分类名称" & vbCrLf & strGongjian & "新设下级,", "请输入", "新设下级")
xxfl = strGongjian & tz & ","
'适当增加错误检测
If MsgBox("新设下级代码:" & daihao & vbCrLf & "详细分类名称:" & xxfl & vbCrLf & "确认增加吗?", vbYesNo, "确认") = vbYes Then
'写入表的代码和增加节点的代码
End If
End Function |
|