Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a way to convert a EXCEL form into a WORD form? | Excel Discussion (Misc queries) | |||
Data Form Deletions | Excel Discussion (Misc queries) | |||
How do I set up and use a group box form control? | Excel Discussion (Misc queries) | |||
Trying to delete form border, and it deletes all borders | Excel Discussion (Misc queries) | |||
How can I find the common names in two columns of names? | Excel Discussion (Misc queries) |