CluelessRink
Technical User
Is there a way to suppress the #Error message that normally occures when you don't have any data for a DSum function?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub runningsum_BeforeUpdate(Cancel As Integer)
Sub CheckValue()
Dim frm As Form, ctl As Control
Dim varResult As Variant
' Return Form object variable pointing to frm_main_tip_form form.
Set frm = Forms!frm_main_tip_form
' Return Control object variable pointing to runningsum.
Set ctl = frm!runningsum
' Choose result based on value of control.
varResult = IIf(Nz(ctl.Value) = "", _
"No value", "Value is " & ctl.Value)
' Display result.
MsgBox varResult
End Sub
=DSum("totalsales","tbl_tips"," [transdate] = #" & [transdate] & "#")
[blue]=DSum("totalsales","tbl_tips"," [transdate] = #" & [purple][b]Me!transdate[/b][/purple] & "#")[/blue]