Private Sub コマンド1_Click()
Dim sql As String
sql = "insert into [テーブル名] values(1, 'テスト', '備考');"
DoCmd.RunSQL sql
End Sub
Private Sub コマンド1_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim sql As String
sql = "SELECT * FROM [テーブル名]"
Set db = CurrentDb
Set rs = db.OpenRecordset(sql)
Do Until rs.EOF
MsgBox (rs![カラム名])
テキスト2.Value = rs![カラム名]
rs.MoveNext
Loop
Set rs = Nothing
Set db = Nothing
End Sub