Private Sub Form_Load()
Dim strName As String
Dim strDate As String
Dim db As DAO.Database ' current database
Dim sSQL As String ' SQL query
Set db = DBEngine(0)(0)
strName = Text74.Value
strDate = Text70.Value
sSQL = "INSERT INTO userLog (uName, uDate) VALUES (strName, strDate) "
db.Execute sSQL
MsgBox strName
MsgBox strDate
|