ProductParentID & Format(Val(Right(strProductID, 4)) + 1, "0000")' Debug.Print strProductIDSet rst = CurrentDb.OpenRecordset("tblProduct", 2) '打开记录集 rst.AddNew rst!ProductParentID = Me!ProductParentID rst!ProductName = Me!ProductName rst!ProductID = strProductID ...
(x, 1) = "" Then Exit For Debug.Print 父亲(x, 1) f3 = Dir(父亲(x, 1) & "*.*") Do While f3 <> "" k = k + 1 m = m + 1 父亲(k, 1) = 父亲(x, 1) & f3 & "\" 父亲(k, 2) = 父亲(x, 2) & Format(m, "00") f3 = Dir Loop Next x '***数据导入Tree...
'取到上级键值的最大值 strProductID = Nz(DMax("ProductID", "tblProduct", strWhere), "") '生成编号 strProductID = Me!ProductParentID & Format(Val(Right(strProductID, 4)) + 1, "0000") ' Debug.Print strProductID Set rst = CurrentDb.OpenRecordset("tblProduct", 2) '打开记录集 rst...
strProductID=Me!ProductParentID&Format(Val(Right(strProductID,4))+1,"0000")' Debug.Print strProductIDSetrst=CurrentDb.OpenRecordset("tblProduct",2)'打开记录集 rst.AddNew rst!ProductParentID=Me!ProductParentID rst!ProductName=Me!ProductName rst!ProductID=strProductID rst.Update MsgBox"保存成功。
' Debug.Print strProductID strSQL = "select * from tblProduct where ProductID='" & Me.ProductID & "'" Set rst = CurrentDb.OpenRecordset(strSQL, 2) '打开记录集 If rst.EOF Then rst.AddNew rst!ProductParentID = Me!ProductParentID ...
例如,如果“团队规划器”视图处于活动状态,则语句将输出“Team Planner”。 VB 复制 Debug.Print ActiveWindow.ActivePane.View.Name 支持和反馈 有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。反馈 此页面是否有帮助? 是 否 ...
下列Microsoft Visual Basic for Applications (VBA) 範例會將olTableView類型之所有View物件的語言類型設定為美式英文。 VB 複製 Sub SetLanguage() 'Sets the language of all table views to U.S. English. Dim objViews As Outlook.Views Dim objView As Outlook.View Set objViews = _ Application.GetName...
VBA小技巧05:将数据打印在VBE立即窗口的一行中 这是一个很简单的技巧,但有时可能会给你的代码调试带来一些方便。...通常,在编写代码时,我们会在其中放置一些Debug.Print语句,用来在立即窗口中打印程序运行过程中的一些变量值,了解程序的运行状态。...一般情况下,Debug.Print语句每运行一次,就会将要打印的...
Debug.Print (" Position: " & swBreakLine.GetPosition(0)) swDrawingDoc.BreakView Stop ' Positions of the break lines are modified, and the view is broken ' Press F5 status = swModelDocExt.SelectByID2("Drawing View1", "DRAWINGVIEW", 0, 0, 0, False, 0, Nothing, 0) ...
ProductParentID & Format(Val(Right(strProductID,4)) +1,"0000")' Debug.Print strProductIDSetrst = CurrentDb.OpenRecordset("tblProduct",2)'打开记录集rst.AddNew rst!ProductParentID =Me!ProductParentID rst!ProductName =Me!ProductName rst!ProductID = strProductID rst.Update MsgBox"保存成功。",...