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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if DCount works to get count, what simple funct call can I use for....

Status
Not open for further replies.

rdjohnso

Programmer
Mar 30, 2001
67
US
Got this from someone else to tell me how to get a count of a group in a certain period of time.... NOW

=DCount("*","tbl_Person","Now() Between StartDate And EndDate And GroupType='GWHIS'")

*******************
if DCount works to get count, what simple function call can I use to get a record cell from a table...

For instance.... typically I could write SQL to get this:

SELECT ForecastAmount FROM rtbl_Forecast WHERE ForecastTitle = 'Software Licenses' AND ForecastTimePeriod = 3/1/2006

It would Return: 3000

.....I dont know Access well enough to know what funct call I can use... i figure there has to be something like above I can use....

Please advise, thanks,

Ron
 
*** Further Clarification... I am trying to avoid having to call functions... just want something like the DCount that I can put in the ControlSource for each cell needed in a report....
 
someone offered this... its close but doesnt quite work?

=DLookup("[ForecastAmount]", "rtbl_Forecast", "[ForecastTitle] = Software Licences AND [ForecastTimePeriod] = 3/1/2006")

 
Do you really have a specific date in the DLookup()? Try:
=DLookup("[ForecastAmount]", "rtbl_Forecast", "[ForecastTitle] = 'Software Licences' AND [ForecastTimePeriod] = #3/1/2006#")



Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top