Command button in a form

  • Thread starter Thread starter PJ
  • Start date Start date
P

PJ

I have the following coding on a command button in a form:

Private Sub cmdSelectAllIssuers_Click()
Dim s As String
s = "UPDATE tbl Master Comps SET Tbl Master Comps.Issuer Select Check Box =
True " & _
"WHERE (((tbl Master Comps.Issuer Select Check Box)=False));"
Currentdb.excute s
End Sub

It gives me a runtime error 3144 Syntak error in update statement and
highlights the currentdb.excute s.


I want to be able to click on the command button "cmdSelectAllIssuers" and
have the check box "Issuer Select Check Box" in the form be checked for each
customer.

Any ideas why the above code is not working??

Thanks in advance!!!
 
I have the following coding on a command button in a form:

Private Sub cmdSelectAllIssuers_Click()
Dim s As String
s = "UPDATE tbl Master Comps SET Tbl Master Comps.Issuer Select Check Box =
True " & _
"WHERE (((tbl Master Comps.Issuer Select Check Box)=False));"
Currentdb.excute s
End Sub

It gives me a runtime error 3144 Syntak error in update statement and
highlights the currentdb.excute s.

I want to be able to click on the command button "cmdSelectAllIssuers"  and
have the check box "Issuer Select Check Box" in the form be checked for each
customer.

Any ideas why the above code is not working??

Thanks in advance!!!

Maybe the spaces are the problem. Try:
s = "UPDATE [tbl Master Comps] SET [Tbl Master Comps].[Issuer Select
Check Box] = True " & _
"WHERE [tbl Master Comps].[Issuer Select Check Box]=False"

Groeten,

Peter
http://access.xps350.com
 
Thank you it worked!!!

XPS350 said:
I have the following coding on a command button in a form:

Private Sub cmdSelectAllIssuers_Click()
Dim s As String
s = "UPDATE tbl Master Comps SET Tbl Master Comps.Issuer Select Check Box =
True " & _
"WHERE (((tbl Master Comps.Issuer Select Check Box)=False));"
Currentdb.excute s
End Sub

It gives me a runtime error 3144 Syntak error in update statement and
highlights the currentdb.excute s.

I want to be able to click on the command button "cmdSelectAllIssuers" and
have the check box "Issuer Select Check Box" in the form be checked for each
customer.

Any ideas why the above code is not working??

Thanks in advance!!!

Maybe the spaces are the problem. Try:
s = "UPDATE [tbl Master Comps] SET [Tbl Master Comps].[Issuer Select
Check Box] = True " & _
"WHERE [tbl Master Comps].[Issuer Select Check Box]=False"

Groeten,

Peter
http://access.xps350.com
.
 
Back
Top