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

Union Query Problem

Status
Not open for further replies.

MadMax7

MIS
Feb 17, 2004
62
GB
I have this very simple union query ....

SELECT [Department],[17/05/2005]
FROM [qryVitalStatsCallsOffered]

UNION ALL SELECT [Department],[17/05/2005]
FROM [qryVitalStatsCallsabd];


the problem i have is the field [17/05/2005] is a date field in qryVitalStatsCallsOffered and depending on what date the user selects from a calender control on a form (frmPreviewReports!axSelectDate)depends on what date qryVitalStatsCallsOffered will return

So i was wondering if anybody knows a way of me being able to automatically change the name of [17/05/2005]in the union query to whatever date is selected rather than having to go into the design view of the union query and manually change it each time



 
Why doesn't your queries return always the same field names ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I think the field names are the dates so the table is like:

Department, 17/05/2005, 18/05/2005, 19/05/2005

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top