Maysan
12-16-2010, 04:35 AM
I´m trying to save a textbox-value to a table called Contacts and the filed named SlipScannedECMDate. But I get this messages: Too few parameters. expected 1.
Can anyone help me with this problem?
Private Sub cmdSave_Click()
Dim lRecordValue As String
Dim lDatum As String
On Error GoTo Err_cmdSave_Click
'DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
' Module1.IsDirty = False
If MsgBox("Save changes to record?", vbYesNo) = vbYes Then
lRecordValue = RecordID.Value
lDatum = ECMDate.Value
CurrentDb.Execute ("UPDATE Contracts SET SlipScannedECMDate =" & lDatum & " WHERE RecordID = lRecordValue")
End If
Thanks :)
Can anyone help me with this problem?
Private Sub cmdSave_Click()
Dim lRecordValue As String
Dim lDatum As String
On Error GoTo Err_cmdSave_Click
'DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
' Module1.IsDirty = False
If MsgBox("Save changes to record?", vbYesNo) = vbYes Then
lRecordValue = RecordID.Value
lDatum = ECMDate.Value
CurrentDb.Execute ("UPDATE Contracts SET SlipScannedECMDate =" & lDatum & " WHERE RecordID = lRecordValue")
End If
Thanks :)