Duane said:
=Nz(DSum("[Expr1]","SalesDetailsQ","[SalesID] = '" & Forms!Sales!SalesID
& "' AND [SDTaxed] = " & True ),0)
If the True is always True, why don't you use
=Nz(DSum("[Expr1]","SalesDetailsQ","[SalesID] = '" & Forms!Sales!SalesID
& "' AND [SDTaxed] = -1" ),0)
Bless You. I can go home now! That works just fine....Just one more
quick question though. How do I get the form from showing the action? I
have Echo set to False on the code that runs but I can still see the
action. Once again THANK YOU!!!!!!!!!!!!!
DS
Private Sub ListBar_Click()
DoCmd.Echo False, ""
DoCmd.GoToControl "SalesDetails"
DoCmd.GoToRecord , , acNewRec
Forms!Sales.SalesDetails!LineID = _
Nz(DMax("[LineID]", "SalesDetails"), 0) + 1
Me![SalesDetails]![ItemID] = Me.ListBar.Column(0)
Forms!Sales.SalesDetails!MenuNum = Forms!Sales!Text65
Forms!Sales.SalesDetails!SDTaxed = Forms!Sales.SalesDetails!Taxed
Forms!Sales.SalesDetails!SDInclusive =
Forms!Sales.SalesDetails!Inclusive
Forms!Sales.SalesDetails!SDNoTax = Forms!Sales.SalesDetails!NoTax
Forms!Sales.SalesDetails.Form.Requery
With Forms!Sales.SalesDetails.Form.Recordset
If Forms![Sales].[SalesDetails].Form!Text115 > 0 Then
.MoveFirst
Do While .EOF = False And .BOF = False
.Edit
!SDInclusive = False
!SDTaxed = True
If Forms!Sales.SalesDetails.Form!NoTax = True Then
!SDTaxed = False
!SDInclusive = False
End If
.Update
.MoveNext
Loop
End If
End With
DoCmd.GoToRecord , , acLast
DoCmd.Echo True, ""
End Sub