A
Anthony
Hi All
I know very little about code, any help with this would be greatly
appreciated.
I have a form which is to print labels, the form is filtered using the
module "stEOPWhereClause"
If the "SelectAll" button is pressed I want to update the tick box' listed
on the form with a tick.
I have the following SQL:
SQL2 = "UPDATE [qryDeliveryLabels-2]" & "SET [qryDeliveryLabels-2].Label01 =
'-1'" & "WHERE ((([qryDeliveryLabels-2].Label01)=0))"
The problem with this one is ALL records are updated, not just the visible
ones, so I thought I would try changing the where clause to be the module:
SQL2 = "UPDATE [qryDeliveryLabels-2]" & "SET [qryDeliveryLabels-2].Label01 =
'-1'" & "WHERE (((" & stEOPWhereClause & "))"
For this example stEOPWhereClause returns:
[EnteredDate] Between [Forms]![frmEndOfProm]![StartDate] And
[Forms]![frmEndOfProm]![EndDate] AND [Brochurecode] Like
[Forms]![frmEndOfProm]![SelectBrochureAll]
But this causes an error:
Missing ), ] or Item in query expression '(((
[EnteredDate] Between [Forms]![frmEndOfProm]![StartDate] And
[Forms]![frmEndOfProm]![EndDate] AND [Brochurecode] Like
[Forms]![frmEndOfProm]![SelectBrochureAll]))'.
Thanks in advance,
Anthony.
I know very little about code, any help with this would be greatly
appreciated.
I have a form which is to print labels, the form is filtered using the
module "stEOPWhereClause"
If the "SelectAll" button is pressed I want to update the tick box' listed
on the form with a tick.
I have the following SQL:
SQL2 = "UPDATE [qryDeliveryLabels-2]" & "SET [qryDeliveryLabels-2].Label01 =
'-1'" & "WHERE ((([qryDeliveryLabels-2].Label01)=0))"
The problem with this one is ALL records are updated, not just the visible
ones, so I thought I would try changing the where clause to be the module:
SQL2 = "UPDATE [qryDeliveryLabels-2]" & "SET [qryDeliveryLabels-2].Label01 =
'-1'" & "WHERE (((" & stEOPWhereClause & "))"
For this example stEOPWhereClause returns:
[EnteredDate] Between [Forms]![frmEndOfProm]![StartDate] And
[Forms]![frmEndOfProm]![EndDate] AND [Brochurecode] Like
[Forms]![frmEndOfProm]![SelectBrochureAll]
But this causes an error:
Missing ), ] or Item in query expression '(((
[EnteredDate] Between [Forms]![frmEndOfProm]![StartDate] And
[Forms]![frmEndOfProm]![EndDate] AND [Brochurecode] Like
[Forms]![frmEndOfProm]![SelectBrochureAll]))'.
Thanks in advance,
Anthony.