G
Guest
Hello, may some one please tell why this will not work. I keep getting an error message stating that the runSql action needs an argument consisting of a SQL statement.
Private Sub cmd_password_Click()
On Error GoTo Err_cmd_password_Click
Dim Passw As String
Dim MasterP As Integer
Passw = "SELECT tbl_2004_Library.Reference, tbl_2004_Library.rc, tbl_2004_Library.job, " & _
"tbl_2004_Library.prime, tbl_2004_Library.account, tbl_2004_Library.desc, " & _
"tbl_2004_Library.us_amt, tbl_2004_Library.MP FROM tbl_2004_Library;"
DoCmd.RunSQL Passw
Exit_cmd_password_Click:
Exit Sub
Err_cmd_password_Click:
MsgBox Err.DESCRIPTION
Resume Exit_cmd_password_Click
End Sub
Private Sub cmd_password_Click()
On Error GoTo Err_cmd_password_Click
Dim Passw As String
Dim MasterP As Integer
Passw = "SELECT tbl_2004_Library.Reference, tbl_2004_Library.rc, tbl_2004_Library.job, " & _
"tbl_2004_Library.prime, tbl_2004_Library.account, tbl_2004_Library.desc, " & _
"tbl_2004_Library.us_amt, tbl_2004_Library.MP FROM tbl_2004_Library;"
DoCmd.RunSQL Passw
Exit_cmd_password_Click:
Exit Sub
Err_cmd_password_Click:
MsgBox Err.DESCRIPTION
Resume Exit_cmd_password_Click
End Sub