Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / September 2007

Tip: Looking for answers? Try searching our database.

Naming File

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DS - 11 Sep 2007 23:45 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.