Re: Importing Excel Spread*** based on date in Form



Sorry, Doug. I didn't scroll down to see that.
--
Dave Hargis, Microsoft Access MVP


"Douglas J. Steele" wrote:

"Klatuu" <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C7921BAD-9437-46F9-B06C-1AF369F59CEC@xxxxxxxxxxxxxxxx
Doug answered the basic question, but you have a design issue here. I
don't
think you really want to have to change your code periodically to do this.
There is a better way.

Private Sub datemo_AfterUpdate()
Dim strFilePath As String

strFilePath = "V:\Diane for Access\" & Format([datemo],"mm mmmm yyyy")
&
" Vendor Billingtest.xls"
DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel9, "miscbilling", _
strFilePath, True, "miscbilling"


And how is that different than my second solution? (Yeah, there was a typo:
I meant to say "you should probably simplify that to", rather than "you
could...")

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)




.