Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2003 Expression Help

Status
Not open for further replies.

KFuessel

Technical User
Aug 9, 2007
5
US
I have created an Access database that stores Software Licenses for my company. As I view each software license and its quantity in “Form View”, I would like to see the current total number of licenses for that particular license. Using Project 2000 as an example, if I'm viewing a Microsoft eOpen license for Project 2000 with a quantity of 10, I would like to be able to view the total number of licenses stored in the database for Project 2000, without including other licenses such as Microsoft Office, Visio, etc...
The Software License Name is stored in a field called “Software”. The quantity for each license is stored in a field called “Quantity”. The name of the table is "Software License Table". The calculated results will be viewed in the form as the “Total Count”.
I have been trying to use the DSum() function in the expression below with no luck. I need to be able to transer the contents of the [Software] field to the "criteria" portion of the function as noted below with the "?":

=DSum("[Quantity]", "Software License Table", "[Software]= ?")

What is the proper syntax for the expression that I need?
Is there additional code that needs to be entered?
Is this the right function?

Your help will be greatly appreciated. Thanks.
___________________

Kelly Fuessel
Hart InterCivic
Desktop Support
Phone: 512-252-6812
kfuessel@hartic.com




 
Software is a text field so you use single quotes, like so:

[tt]=DSum("[Quantity]", "Software License Table", "[Software]= '" & Me.[NameOfControlOnFormToMatch] & "'")[/tt]

Number fields do not need quotes and date fields need hash marks (#). The date must be either month, day, year or year, month, day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top