Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2008

Tip: Looking for answers? Try searching our database.

how to name field to include a date range...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
susan - 30 May 2008 15:48 GMT
i created a query to calculate the $ variance between 2 run dates - i got the
results i wanted but i want to name the column heading to include the run
dates...

here's the variance calculation in my query:
ACT/FCST Variance: [3 - qry_second run date_Total ACT/FCST]-[2 - qry_first
run date_Total ACT/FCST]

3 - qry_second run date_Total ACT/FCST:  this gives the Total ACT/FCST #
from the query that pull second run date
2 - qry_first run date_Total ACT/FCST: from first run date

my end result shows title of  "ACT/FCST Variance" like i named it BUT i want
it to include the first and second run dates...so for example if i am running
data between 5/1/08 and 4/1/08...i want the title to show "ACT/FCST Variance
5/1/08 and 4/1/08" (or whatever 2 other dates I am using).  how can i do that?

is this possible?  please help!!!
THANKS,
susan
John Spencer - 30 May 2008 17:24 GMT
I know of no way to change field names in a query on the fly.  Where would you
get the run dates anyway?

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

> i created a query to calculate the $ variance between 2 run dates - i got the
> results i wanted but i want to name the column heading to include the run
[quoted text clipped - 16 lines]
> THANKS,
> susan
susan - 30 May 2008 17:36 GMT
The run dates are already in my source table, when i run the query, i have a
parameter set up to ask for the 2 dates.

> I know of no way to change field names in a query on the fly.  Where would you
> get the run dates anyway?
[quoted text clipped - 24 lines]
> > THANKS,
> > susan
John Spencer - 30 May 2008 17:41 GMT
Depending on the query (you didn't post it), you should be able to add the
parameters to the SELECT clause and see them as field results.

SELECT [Enter End Date], RunDate
FROM SomeTable
WHERE RunDate = [Enter End Date]

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County

> The run dates are already in my source table, when i run the query, i have a
> parameter set up to ask for the 2 dates.
[quoted text clipped - 27 lines]
>>> THANKS,
>>> susan
John W. Vinson - 31 May 2008 02:53 GMT
> i want to name the column heading to include the run
>dates...

Don't confuse data STORAGE with data PRESENTATION.

You can use textboxes in the header of a Report with control sources like

=[Enter start date:]

using whatever you have used as a parameter for your query. It is not
necessary or appropriate to set the fieldnames of a query for this purpose.
Signature


            John W. Vinson [MVP]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.