D
Devon
Hello
I am attempting to automate the process of importing data from a
spreadsheet, then cleaning up the data on the spreadsheet. The spreadsheet I
am using comes from another area within the company. I am running a
DoCmd.TransferSpreadsheet acImport to accomplish the importing.
The spreadsheet is as follows:
Phone Number Carrier January_2009 February_2009 etc..
xxx-xxx-xxxx xxx 100.00 102.00
103.85
yyy-yyy-yyyy xxx 85.52 75.85
102.65
etc... represents the remaining months of 2009
The person in accounting is using this as summary data, similar to a
crosstab query from Access. I created an append query that inserts a new
column called month_year, and then changed the January_2009 column heading to
read monthly_charges.
My current SQL is as follows:
INSERT INTO tblMonthlyCharges ( IMSI, Carrier_Information, Phone_Number,
Month_Year, Monthly_Charge )
SELECT SIM_Data.IMSI, SIM_Data.Carrier_Information, SIM_Data.Phone_Number,
'December_2009' AS Month_Year, SPREADSHEET.December_2009 AS Monthly_Charge
FROM SIM_Data INNER JOIN SPREADSHEET ON SIM_Data.Phone_Number =
SPREADSHEET.[Phone Number];
The above works fine, but I would like to find a way to automate entering
the month_year data (e.g. December_2009). SPREADSHEET is the name of the
spreadsheet I import into the database.
I have created a form (frmAction) with an unbound combo box (cboDate), and
can update the following field by typing in the date (e.g. January_2009)
(Forms![frmAction].cboDate) AS Month_Year.
I would like to figure out how to use an unbound combo box to update the
monthly charge field for the following: SPREADSHEET.December_2009 AS
Monthly_Charge. As my subject heading indicates, since December_2009 is a
column heading, (Forms![frmAction].cboDate) does not appear to work.
Can anyone help me automate this final piece of the puzzle?
Thanks in advance
Devon
I am attempting to automate the process of importing data from a
spreadsheet, then cleaning up the data on the spreadsheet. The spreadsheet I
am using comes from another area within the company. I am running a
DoCmd.TransferSpreadsheet acImport to accomplish the importing.
The spreadsheet is as follows:
Phone Number Carrier January_2009 February_2009 etc..
xxx-xxx-xxxx xxx 100.00 102.00
103.85
yyy-yyy-yyyy xxx 85.52 75.85
102.65
etc... represents the remaining months of 2009
The person in accounting is using this as summary data, similar to a
crosstab query from Access. I created an append query that inserts a new
column called month_year, and then changed the January_2009 column heading to
read monthly_charges.
My current SQL is as follows:
INSERT INTO tblMonthlyCharges ( IMSI, Carrier_Information, Phone_Number,
Month_Year, Monthly_Charge )
SELECT SIM_Data.IMSI, SIM_Data.Carrier_Information, SIM_Data.Phone_Number,
'December_2009' AS Month_Year, SPREADSHEET.December_2009 AS Monthly_Charge
FROM SIM_Data INNER JOIN SPREADSHEET ON SIM_Data.Phone_Number =
SPREADSHEET.[Phone Number];
The above works fine, but I would like to find a way to automate entering
the month_year data (e.g. December_2009). SPREADSHEET is the name of the
spreadsheet I import into the database.
I have created a form (frmAction) with an unbound combo box (cboDate), and
can update the following field by typing in the date (e.g. January_2009)
(Forms![frmAction].cboDate) AS Month_Year.
I would like to figure out how to use an unbound combo box to update the
monthly charge field for the following: SPREADSHEET.December_2009 AS
Monthly_Charge. As my subject heading indicates, since December_2009 is a
column heading, (Forms![frmAction].cboDate) does not appear to work.
Can anyone help me automate this final piece of the puzzle?
Thanks in advance
Devon