「Access VBA レコードの挿入」の版間の差分
ナビゲーションに移動
検索に移動
(ページの作成:「==Access VBA レコードの挿入== Access 2000 Public Sub insertData() Dim conn As ADODB.Connection Dim rec As ADODB.Recordset Set conn =…」) |
|||
1行目: | 1行目: | ||
− | ==Access VBA レコードの挿入== | + | ==[[Access VBA レコードの挿入]]== |
− | Access 2000 | + | [[Access]] 2000 |
Public Sub insertData() | Public Sub insertData() | ||
Dim conn As ADODB.Connection | Dim conn As ADODB.Connection | ||
− | Dim rec As ADODB. | + | Dim rec As ADODB.[[R]]ecordset |
Set conn = CurrentProject.Connection | Set conn = CurrentProject.Connection | ||
− | Set rec = New ADODB. | + | Set rec = New ADODB.[[R]]ecordset |
Call rec.Open("NewTableName", conn, adOpenKeyset, adLockOptimistic) | Call rec.Open("NewTableName", conn, adOpenKeyset, adLockOptimistic) |
2020年2月16日 (日) 04:21時点における最新版
Access VBA レコードの挿入
Access 2000
Public Sub insertData() Dim conn As ADODB.Connection Dim rec As ADODB.Recordset Set conn = CurrentProject.Connection Set rec = New ADODB.Recordset Call rec.Open("NewTableName", conn, adOpenKeyset, adLockOptimistic) rec.AddNew rec("Field01") = "aaaa" rec("Field02") = "bbbb" rec("Field03") = "cccc" rec.Update rec.Close conn.Close Set rec = Nothing Set conn = Nothing End Sub
© 2006 矢木浩人