I want to name a file with the contents of a Text Field.
It's a date.
FileCopy "C:\PROSERV\DB\Restore.mdb",
"C:\PROSERV\BU\Forms!frmFXEOD!TxtBizDate" & ".mdb"
Now I'm getting Forms!frmFXEOD!TxtBizDate.mdb
I should get 091107.mdb
Any help appreciated.
Thanks
DS
Marshall Barton - 11 Sep 2007 23:51 GMT
>I want to name a file with the contents of a Text Field.
>It's a date.
[quoted text clipped - 4 lines]
>
>I should get 091107.mdb
"C:\PROSERV\BU\" & Format(Forms!frmFXEOD!TxtBizDate,
"mmddyy") & ".mdb"

Signature
Marsh
MVP [MS Access]
DS - 12 Sep 2007 12:37 GMT
>>I want to name a file with the contents of a Text Field.
>>It's a date.
[quoted text clipped - 7 lines]
> "C:\PROSERV\BU\" & Format(Forms!frmFXEOD!TxtBizDate,
> "mmddyy") & ".mdb"
Worked perfectly!
Thanks
DS
Rob Parker - 11 Sep 2007 23:56 GMT
You need to concatenate the value from the textbox to your path; at present
you've got the textbox reference hard-wired into the path/name string. Try:
... "C:\PROSERV\BU\" & Forms!frmFXEOD!TxtBizDate & ".mdb"
Similar answer applies to the two other questions you posted recently.
HTH,
Rob
>I want to name a file with the contents of a Text Field.
> It's a date.
[quoted text clipped - 8 lines]
> Thanks
> DS