If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Is there a way to turn off the prompts of a make table query?
I merely want to update the table to be used as an export to Excel using
TransferSpreadsheet. Each time it prompts for deleting old records and adding new records. Is there a was to turn off the prompts? Bottom line - I want to create an Macro to export the output of a query to an Excel spreadsheet. |
#2
|
|||
|
|||
Is there a way to turn off the prompts of a make table query?
BobC,
DoCmd.SetWarnings False 'Off Your TransferSpreadsheet line here DoCmd.SetWarnings True 'On -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "BobC" wrote in message ... I merely want to update the table to be used as an export to Excel using TransferSpreadsheet. Each time it prompts for deleting old records and adding new records. Is there a was to turn off the prompts? Bottom line - I want to create an Macro to export the output of a query to an Excel spreadsheet. |
#3
|
|||
|
|||
Is there a way to turn off the prompts of a make table query?
BobC wrote:
I merely want to update the table to be used as an export to Excel using TransferSpreadsheet. Each time it prompts for deleting old records and adding new records. Is there a was to turn off the prompts? Bottom line - I want to create an Macro to export the output of a query to an Excel spreadsheet. As Gina hinted, without really saying so, you won't be able to accomplish directly this with a Macro. You will have to use VBA code, which can be called by a Macro, but I'm not really sure why a macro would be needed. You can call VBA code using a button on a form as simply as you can call a macro. Anyways, I do think some error-handling should be added to Gina's suggestion so that if an error occurs, you won't be stuck with Warnings turned off until the user turns them back on via Tools|Options or restarts Access. Sub SpreadSheetXferNoWarnings() On Error Resume Err_Handler DoCmd.SetWarnings False 'Off Your commands to update the table and transfer the spreadsheed here Exit_Sub: DoCmd.SetWarnings True 'On Exit Sub Err_Handler: Msgbox Err.Description GoTo Exit_Sub End Sub -- Microsoft MVP - ASP/ASP.NET - 2004-2007 Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" |
#4
|
|||
|
|||
Is there a way to turn off the prompts of a make table query?
Both Bob's...
BobC... You can actually do what I suggested in a Macro BUT as Bob Barrows' suggested you should put in some error code and THAT you can't accomplish with a Macro. Bob Barrows... Thanks for catching the MACRO part, my eyes skipped right over that! -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Bob Barrows" wrote in message ... BobC wrote: I merely want to update the table to be used as an export to Excel using TransferSpreadsheet. Each time it prompts for deleting old records and adding new records. Is there a was to turn off the prompts? Bottom line - I want to create an Macro to export the output of a query to an Excel spreadsheet. As Gina hinted, without really saying so, you won't be able to accomplish directly this with a Macro. You will have to use VBA code, which can be called by a Macro, but I'm not really sure why a macro would be needed. You can call VBA code using a button on a form as simply as you can call a macro. Anyways, I do think some error-handling should be added to Gina's suggestion so that if an error occurs, you won't be stuck with Warnings turned off until the user turns them back on via Tools|Options or restarts Access. Sub SpreadSheetXferNoWarnings() On Error Resume Err_Handler DoCmd.SetWarnings False 'Off Your commands to update the table and transfer the spreadsheed here Exit_Sub: DoCmd.SetWarnings True 'On Exit Sub Err_Handler: Msgbox Err.Description GoTo Exit_Sub End Sub -- Microsoft MVP - ASP/ASP.NET - 2004-2007 Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" |
Thread Tools | |
Display Modes | |
|
|