Command button in a form

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!!!
 
X

XPS350

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
 
P

PJ

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
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top