Thanks.
Where exactly do I put the code CurrentDB.Execute SQL_Text, dbFailOnError? I have tried different things, but can not get it to work.
How about the editing part? I guess this complicated?
Thanks.
Where exactly do I put the code CurrentDB.Execute SQL_Text, dbFailOnError? I have tried different things, but can not get it to work.
How about the editing part? I guess this complicated?
I am sorry to say but I have the same problem with this line:
"Delete * From Table2 WHERE [Item number] = " & [Item number]
Exactly where do I put it, and what comes first and what comes after?
I feel so stupid asking these questions, but I do not know much about programming.
Thank you very much!
How are you deleting the record?I am sorry to say but I have the same problem with this line:
"Delete * From Table2 WHERE [Item number] = " & [Item number]
Exactly where do I put it, and what comes first and what comes after?
I feel so stupid asking these questions, but I do not know much about programming.
Thank you very much!
Add the code supplied at the beginning of the code in the Command button.
When I do this it says:
Compile error:
Expected: line number or label or statement or end of statement
Is there something missing?
Post all of the code for the button here so we can see it. Please use the CODE tags (the # button).
Private Sub Kommandoknap32_Click()
On Error GoTo Err_Kommandoknap32_Click
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Exit_Kommandoknap32_Click:
Exit Sub
Err_Kommandoknap32_Click:
MsgBox Err.Description
Resume Exit_Kommandoknap32_Click
End Sub
Here's a link that helps convert those old DoMenuItem lines to the new RunCommand form: http://www.accessruncommand.com/domenuitem.htm
I see nothing in the code you posted that would throw the error you mentioned.
Thanks.
No, this code will not throw an error, but it does when I add this:
"Delete * From Table2 WHERE [Item number] = " & [Item number]
Is it correct that this line should stand alone and not be in connection with other lines in the rest of the code for the button?
Is correct that it starts with "?
Try:
CurrentDB.Execute "Delete * From Table2 WHERE [Item number] = " & [Item number], dbFailOnError
Thanks, I will try that.
Have you seen my post under "Reports" where I ask about why some of my Word tables do not show in the report?
I would very much like a solution to this.