閉じる

Withステートメント 参照を簡略化する。( With End With)


'

' With 

'       [ 処理 ]

' End With

'



 Dim rs As DAO.Recordset

 Set db = CurrentDb

 Set rs = db.OpenRecordset("MasterTB",dbOpenDynaset, dbAppnedPnly)



 With rs

   .Addnew

      

      ![CD] = "1"

      ![Name] = "test"



      .Update

      .Close

 End With