|
前文訂正します。
-------------------------------------
Private Sub 入力cmd_Click()
On Error GoTo Err_入力cmd_Click
Dim sID As String
Dim dtmNow As Date
Dim sSQL As String
Dim tblName As String
sID = CStr(Me.更新者.Value)
tblName = "sheet1"
dtmNow = Now()
sSQL = "INSERT INTO " & tblName & "(更新者, 更新日) "
sSQL = sSQL & "VALUES('" & sID & "', #" & dtmNow & "#);"
Debug.Print sSQL
CurrentDb.Execute sSQL
Exit_入力cmd_Click:
Exit Sub
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = ChrW(83) & ChrW(104) & ChrW(101) & ChrW(101) & ChrW(116) & ChrW(49) & ChrW(95) & ChrW(12463) & ChrW(12456) & ChrW(12522)
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
On Error GoTo e
Dim fn As String
fn = テキスト5
DoCmd.Close acForm, fn
e:
Exit Sub
Err_入力cmd_Click:
MsgBox Err.Description
Resume Exit_入力cmd_Click
End Sub
---------------------------------
|
|