If I enter a value into the appropriate field then the DSum works great.
What I am looking to accomplish is to loose or hide the #Error that shows up before a value is entered.
Ok, I put the following into the beforeupdate event...
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 =...
Yikes! That looks pretty complicated. I'll try to break it down.
1. Where or for what event do I put the function?
2. Does it go into the text box where I have the DSum? Or into the text box it pulls the data from?
Actually the only error I have is that the field is looking for data that isn't there. Not a problem, it'll be entered eventually.
I just don't like the #Error that shows up and was wondering if there was a way to suppress it.
I have a text box set up on my form using the following DSum statement to get data via a query...
=DLookUp("SumOftotalSales","qry_sales_by_dept_es","transdate=#" & [transdate] & "#'")
It isn't working correctly though, I am getting #Error.
What do I have wrong?
What the!!??
Here's an odd one!
When I run the query, it pull up a bunch of data that isn't even in the table(s).
I've done a compress and repair, but it's still there.
What would cause that?
Hey gol, your not out of line (at least I don't think you are), but I don't mind the dlookups, especially since I am learning while I am putting this thing together.
I took on the project being a "kind of" access user and didn't really know what I was getting into.
But I sure am learning a lot!
Yes all are true except for [es], it is not a control but the name of a dept (which is a control).
es is the name of the dept that I want the sumoftotalsales for.
I have a DSum that goes
And it works wonderfully.
I would like to add another variable to it though, one that will pull the data from another field called dept from the table named tbl_employees.
I've tried
but that didn't work.
How would I phrase it?
What I am trying to do is get the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.