I have a Form with Text boxes that contain report names. I have a button on the form that executes the below code.... for some reason I can't get the text box background color to change before and after the code is executed. Can someone help me understand what I am doing wrong? Basically I want the text box background color to turn Red just before the DoCmd's are executed and turn Greeen when it is complete for each report.
Code:
Private Sub Command0_Click()
'Module Create By Brian Conner 5/2/2010
Dim User As String
Dim GrpNum As String
User = Environ$("USERNAME")
GrpNum = Txt_Grp.Value
'Recon_ATB_Sum_By_Payor
[B]txtATBReview.BackColor = vbRed[/B]
DoCmd.TransferSpreadsheet acExport, , "Recon_ATB_Sum_By_Payor", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Rej_Summary", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Appeals_Summary", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Unresponded_Summary", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_CPC_Non_Contracted_Summary", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Appeals", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Appeals_Summary", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_FSC_616", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Summary_616", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Credentialing", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Credentialing_Summary", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
DoCmd.TransferSpreadsheet acExport, , "Review_Credit_Invoices", "C:\1 ATB Review\" & GrpNum & "ATBReview.xls", True
[B]txtATBReview.BackColor = vbGreen[/B]
[B]txtCredits.BackColor = vbRed[/B]
'Export Credit Report to Excel Workbook on Desktop
DoCmd.TransferSpreadsheet acExport, , "Credits_With_Payments_Adj", "C:\CreditReport\" & GrpNum & "Credit_Report.xls", True
[B]txtCredits.BackColor = vbGreen[/B]
[B]txtCleanClaim.BackColor = vbRed[/B]
'Export Clean_Claims_Against_Open_AR_Without_Pymt_Adj to Excel Workbook on Desktop
DoCmd.TransferSpreadsheet acExport, , "ATB_With_Clean_Claims", "C:\ATB_With_CleanClaims\" & GrpNum & "Clean_Claims_With_Open_AR.xls", True
[B]txtCleanClaim.BackColor = vbGreen[/B]
end sub