RE: Importing Excel Spreadsheet based on date in Form
- From: Diane <Diane@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Apr 2008 13:44:01 -0700
This is my code.... I am getting an error of "Else without If"
Private Sub datemo_AfterUpdate()
If [datemo] = #3/1/2008# Then DoCmd.TransferSpread*** ,
acSpreadsheetTypeExcel9, "miscbilling", _
"V:\Diane for Access\03 March 2008 Vendor Billingtest.xls", True,
"miscbilling"
ElseIf [datemo] = #4/1/2008# Then DoCmd.TransferSpread*** ,
acSpreadsheetTypeExcel9, "miscbilling", _
"V:\Diane for Access\04 April 2008 Vendor Billingtest.xls", True,
"miscbilling"
ElseIf [datemo] = #5/1/2008# Then DoCmd.TransferSpread*** ,
acSpreadsheetTypeExcel9, "miscbilling", _
"V:\Diane for Access\05 May 2008 Vendor Billingtest.xls", True, "miscbilling"
"Klatuu" wrote:
Post the code you are using including the code that fails..
Include the error number and point out the line where it fails.
--
Dave Hargis, Microsoft Access MVP
"Diane" wrote:
I am trying to import a particular Excel Spread*** based on a date setup on
a form. I am trying to use an if-then-else statement and it continues to
bomb. If I just use on statement it works but if I try to add an Else
statment it doesn't. Any suggestions.
- Follow-Ups:
- RE: Importing Excel Spread*** based on date in Form
- From: Klatuu
- Re: Importing Excel Spread*** based on date in Form
- From: Douglas J. Steele
- RE: Importing Excel Spread*** based on date in Form
- References:
- Importing Excel Spread*** based on date in Form
- From: Diane
- RE: Importing Excel Spread*** based on date in Form
- From: Klatuu
- Importing Excel Spread*** based on date in Form
- Prev by Date: Re: Numbering
- Next by Date: Re: Importing Excel Spread*** based on date in Form
- Previous by thread: RE: Importing Excel Spread*** based on date in Form
- Next by thread: Re: Importing Excel Spread*** based on date in Form
- Index(es):