transfer text action 
Author Message
 transfer text action

I also need a little help here:

This is what I need to do:

NameFile="c:\my documents\ & <field on form. & ".doc"

  DoCmd.TransferText acExportMerge, , "Tbl_Eds_Listing", NameFile, True

Where <NameFile> is the full path and name of a file.  The filename changes,
so I need a way to tell the function what the name will be used now.

When I try to run this code, I get a runtime error 3044, "C:\My Documents\'
is not a valid path.

Well, I made sure the folder exists off the root of C:.

Thanks.

--
Bill

PhotoSourceFolio webmaster
http://www.*-*-*.com/



Sun, 06 Jun 2004 10:57:51 GMT  
 transfer text action
I had a similar problem to code through recently. In my case, I wanted
to show pictures based on field values. Here is the core code for the
solution that I came up with.

Hope this helps.
Edward

' Shows the picture by concatenating Lastname, Firstname and bytPicNo (#1-3)
' Lastname, and Firstname are field names in a table.
' The resulting filename would be in the format c:\photos\Smith John 1.jpg

Sub ShowPicture()

Dim strPhotoName As String
Dim strPhotoPath As String
Dim bytPicNo as byte 'This value is from 1 - 3 (the allowable amount of
pictures for each person).

strPhotoPath = "c:\Photos\"
strPhotoName = [LastName] & ", " & [FirstName] & " " & bytPicNo

ctlImage.picture = strPhotoPath & strPhotoName & ".jpg"

Quote:

>I also need a little help here:

>This is what I need to do:

>NameFile="c:\my documents\ & <field on form. & ".doc"

>  DoCmd.TransferText acExportMerge, , "Tbl_Eds_Listing", NameFile, True

>Where <NameFile> is the full path and name of a file.  The filename changes,
>so I need a way to tell the function what the name will be used now.

>When I try to run this code, I get a runtime error 3044, "C:\My Documents\'
>is not a valid path.

>Well, I made sure the folder exists off the root of C:.

>Thanks.

>--
>Bill

>PhotoSourceFolio webmaster
>http://www.photosourcefolio.com



Sun, 06 Jun 2004 14:57:30 GMT  
 transfer text action
Try

NameFile="c:\my documents\" & Me.txtTextBox & ".doc"

Note the DoubleQuote before the first concatenation operator (&).

HTH
Van T. Dinh


Quote:
> I also need a little help here:

> This is what I need to do:

> NameFile="c:\my documents\ & <field on form. & ".doc"

>   DoCmd.TransferText acExportMerge, , "Tbl_Eds_Listing", NameFile, True

> Where <NameFile> is the full path and name of a file.  The filename
changes,
> so I need a way to tell the function what the name will be used now.

> When I try to run this code, I get a runtime error 3044, "C:\My
Documents\'
> is not a valid path.

> Well, I made sure the folder exists off the root of C:.

> Thanks.

> --
> Bill

> PhotoSourceFolio webmaster
> http://www.photosourcefolio.com



Sun, 06 Jun 2004 20:32:32 GMT  
 transfer text action
Well, what ended up working (but causing yet another problem, see earlier
post) was this:

DoCmd.TransferText acExportMerge, , "Tbl_Eds_Listing","c:\my documents\" &
Me.txtTextBox & ".doc", True

which I figured never would work.

:-)

And I had to change .DOC to .TXT to bypass some *#&$% MS "security feature"
introduced in win2k and/or ac2000.

I didn't see any double quotes in the sample line you showed.

--
Bill

PhotoSourceFolio webmaster
http://www.photosourcefolio.com



Mon, 07 Jun 2004 00:17:36 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Can I use an SQL action query to transfer data between DIFFERENT Access .mdb files

2. Aligning text Left or Mid in MsgBox function/action

3. TransferText action & delimited text file specifications (A97)

4. Formatting text in SendObject action?

5. Adding a new Action to the ACTION LIST

6. Strange Action of Text Fields In Access 2.0 Database

7. transfer text

8. VBA Transfer Text CSV - Cannot find file

9. Transfer Text

10. Transfer Text Method

11. Export a query def by transfer text command

12. Programmatically transfer DecimalPlaces property from table field to form text box

 

 
Powered by phpBB® Forum Software