From: PJ on 18 Apr 2010 10:35 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!!!
From: XPS350 on 18 Apr 2010 10:56 On 18 apr, 16:35, PJ <P...(a)discussions.microsoft.com> wrote: > 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
From: PJ on 18 Apr 2010 13:24 Thank you it worked!!! "XPS350" wrote: > On 18 apr, 16:35, PJ <P...(a)discussions.microsoft.com> wrote: > > 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 > . >
|
Pages: 1 Prev: First date and last date of the current month Next: Filter Juction Table and related tables |