slynch401k
Posts: 15
|
| Posted: 02/06/2005, 11:25 AM |
|
New to CCS and need direction. I want to append certain records by doing the following:
1. Run a make table query in access.
2. Fill the editable grid with this table.
3. Append the records to another table in access.
I have #2 down. How do I code a button to run the SQL on my backend database, Here is my SQL:
SELECT [Employees]![Last] & ", " & [Employees]![First] AS Participant, Employees.[Social Security], Employees.Key, "" AS [Date], "" AS [Year], "" AS [Period Ending], 0 AS Deferral, 0 AS [Match], 0 AS SafeMatch, 0 AS Loan, 0 AS [Profit Sharing], 0 AS SafePS, 0 AS MPP INTO TblManual
FROM Employees;
Thanks in advance.
|
 |
 |
Nicole
Posts: 586
|
| Posted: 02/07/2005, 2:26 AM |
|
Hello,
You can use CCS Editable Grid builder to create editable grid that is based on Employees table. To move the records to TblManual table you need to execute custom query in After Submit event of editable grid.
Use CCExecSQL function and current database connection.
Dim mySQL
mySQL = "SELECT [Employees]![Last] & ', ' & [Employees]![First] AS Participant, Employees.[Social Security], Employees.Key, '' AS [Date],'' AS [Year], '' AS [Period Ending], 0 AS Deferral, 0 AS [Match], 0 AS SafeMatch, 0 AS Loan, 0 AS [Profit Sharing], 0 AS SafePS, 0 AS MPP INTO TblManual FROM Employees"
CCExecSQL mySQL, DBconnection_name, true
_________________
Regards,
Nicole |
 |
 |
|