Tom,
Thank you. Works just the way I thought I'd like. This takes so much work
out of the process I had been using.
--
Jim Ory
"Tom van Stiphout" wrote:
> On Sat, 3 Nov 2007 10:44:01 -0700, Jim Ory
> <jim[at]oryfamilyhistory[dot][comma]> wrote:
>
> Sure:
> DoCmd.OutputTo acOutputReport, stDocName,_ acFormatTXT,
> "C:\Ham\ADIF_Files\ADIF" & Format$(Date,"mmddyyyy") & ".adi"
>
> -Tom.
>
>
>
> >Using WinXP and Access2K2
> >
> >In the following 'on click' event in visual basic a text file is produced
> >and sent to a file folder. The file name is always the same. I'd like to be
> >able to append the current date to the file name ending up with as an
> >example; "ADIF_11032007.adi", or whatever date it happens to be at the time
> >of the report. My code so far:
> >
> > Dim stDocName As String
> > Dim MyDate As String
> >
> > MyDate = Date
> >
> >
> >'Selects which report to use based on queries for each report
> > If optQSL = 1 Then
> > stDocName = "rptADIF_eQSL"
> > ElseIf optQSL = 2 Then
> > stDocName = "rptADIF_LoTW"
> > End If
> >
> > DoCmd.OutputTo acOutputReport, stDocName,_ acFormatTXT,
> >"C:\Ham\ADIF_Files\ADIF.adi"
> >
> >Exit_Adif_Click:
> > Exit Sub
> >
> >Err_Adif_Click:
> > MsgBox Err.Description
> > Resume Exit_Adif_Click
> >
> >End Sub
> >------------------------------------------------------------------------------------------------
> >
> >In visual basic help:
> >
> >Date Function Example
> >This example uses the Date function to return the current system date.
> >
> >Dim MyDate
> >MyDate = Date ' MyDate contains the current system date.
> >-----------------------------------------------------------------------
> >Is it possible to do this?
>
|