Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
AaronC
 
Posts: n/a
Default Using form control names in SQL


I am creating a query that retrieves data from one table and creates a
second table. I want to name the columns in the new table using the
contents of the controls from a form within the same mdb. The form will
be open when this query is run, but I am having trouble creating and
saving the query.

Here is a sample of what I am trying to do...Any help is greatly
appreciated!!

Thanks

SELECT IndividualHolidays.SU, IndividualHolidays.SSN,
IndividualHolidays.Init, IndividualHolidays.LName,
Max(IndividualHolidays.NewYearsDay) AS
Forms!HolidayDatesEntry!NewYearsDay,
Max(IndividualHolidays.AftNewYears) AS
Forms!HolidayDatesEntry!AftNewYears,
Max(IndividualHolidays.PresDay) AS Forms!HolidayDatesEntry!PresDay,
Max(IndividualHolidays.AftPresDay) AS
Forms!HolidayDatesEntry!AftPresDay
…<etc
INTO HolidaysByEmp
FROM IndividualHolidays
GROUP BY IndividualHolidays.SU, IndividualHolidays.SSN,
IndividualHolidays.Init, IndividualHolidays.LName;


--
AaronC
------------------------------------------------------------------------
AaronC's Profile: http://www.excelforum.com/member.php...o&userid=21240
View this thread: http://www.excelforum.com/showthread...hreadid=387226

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to convert a EXCEL form into a WORD form? Carole O Excel Discussion (Misc queries) 1 April 27th 05 10:13 PM
Data Form Deletions CyberTaz Excel Discussion (Misc queries) 1 April 26th 05 01:25 PM
How do I set up and use a group box form control? Grizz905 Excel Discussion (Misc queries) 1 January 20th 05 10:14 PM
Trying to delete form border, and it deletes all borders PeterM Excel Discussion (Misc queries) 11 January 3rd 05 03:36 PM
How can I find the common names in two columns of names? hako Excel Discussion (Misc queries) 2 December 8th 04 01:59 AM


All times are GMT +1. The time now is 07:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"