Opening Stock balances

Hi Experts

Sorry people may be I mislead you. All what I want is how to include a productID range within Dsum

Dsum(“Closing”,”QryOpFinalstocks”,” [ProductID] = “ & Forms![<formname>]![<controlName>]& “ And [Warehouse ID] = “& Forms![<formname>]![<controlName>]& “ And [PPDate] <= “#& Forms![<formname>]![<controlName>]& “ #” )

I need that so that the selected code from the form query are picked correctly

How do we insert a product ID range in the above code??????????????


Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScDirectorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
If I understand correctly, you want to include a range of ProductID's.  If so then try as below.  Adjust the >= and <= related to ProductId as needed.

This assumes that ProductId and Warehouse ID are numeric types in the database, not strings.

I also noticed that you had the wrong type double quotes (word processing style) in your post, but that may have been cut and paste result.

Also it looked like the # concatenation at the end field was a little off, I corrected that I believe.

Dsum("Closing", "QryOpFinalstocks", " [ProductID] <= " & Forms![<formname>]![<controlName1>] & " [ProductID] >= " & Forms![<formname>]![<controlName2>] & " And [Warehouse ID] = " & Forms![<formname>]![<controlName3>] & " And [PPDate] <= #" & Forms![<formname>]![<controlName4>] & "#")

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PortletPaulEE Topic AdvisorCommented:

Appears the original question was not solved.

Perhaps this question should be re-opened?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.