Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FTP a file(s) using MS Access

939 views
Skip to first unread message

PW

unread,
Sep 3, 2019, 11:31:49 PM9/3/19
to
Hi,

Has anyone successfully done this?

I found a link with a download sample, nice form and docs, but it does
not work because two files that are needed to run it are not in the
zip file
(https://www.databasejournal.com/features/msaccess/article.php/3513061/Simple-FTP-Methods-from-Microsoft-Access.htm)

Thanks,

-paulw

Mal Reeve

unread,
Sep 4, 2019, 7:18:57 AM9/4/19
to
I didnt download the files, but from reading the linked article and skimming the code there....what 2 files are missing?
It doesnt appear to need any additional files from my reading.
What errors are you getting?

PW

unread,
Sep 4, 2019, 12:09:19 PM9/4/19
to
*---

Hi!

File does not exist for:

tblFtpFileList

"The recordsource 'tblFTPFileList' does not exist on this form or
report or is misspelled."

tblFtpfileList is the record source of the subform.

filelist.txt

"The Microsoft Access database engine could not find the object
'FileLilst'txt'...."

Someone posted about the first file but no response.
Another said he got it working but did not say how.

It does eventually run, but locks up when I press the upload button
after selecting one of the text files 'justforkicks.txt'


This form takes a very long time to generate those errors. But maybe
there is enough code for me to make my own working one.

There is only one accdb file so everything should be in it or get
created I guess.

There are no tables in the accdb, just forms, macros, modules. I
will look at the code and see if they are created on the fly.

Thanks!

-pauwl

PW

unread,
Sep 4, 2019, 5:17:21 PM9/4/19
to
On Wed, 4 Sep 2019 04:18:53 -0700 (PDT), Mal Reeve
<mal....@gmail.com> wrote:

*--

I also get this message when I start it up. Clearly a flawed piece of
work. Not sure what version of Access it is supposed to work with:


"FTP Demo has imported 'Favorites' and other groups into the converted
database. If you change the imported groups in Access 2007 or
greater, you will not see those changes if you open the database in an
older version of Access. Also, if you change the imported groups by
unsing an older version of Access, you will not see those changes if
you opent the database in Access 2007 or greater."

Well, what are the "imported groups"? "Other Groups" ? What are
'Favorites'? "those groups"? I have no idea what this message means.

I am using Access 2010.

I guess I will have to move on and search for something else.

Thanks!

-pw

PW

unread,
Sep 4, 2019, 5:22:02 PM9/4/19
to
On Wed, 4 Sep 2019 04:18:53 -0700 (PDT), Mal Reeve
<mal....@gmail.com> wrote:

It is just one big error after another with this demo. "The record
source 'select from tblftpfilelist order by filename specified on this
form or report does not exist.."

Again, no tables exist for this.

PW

unread,
Sep 4, 2019, 10:13:57 PM9/4/19
to
*---

It is for Win95/NT. That is why it uses a .scr file. I saw both in
the comments.

I need to keep looking!

-pw

Ron Paii

unread,
Sep 5, 2019, 7:55:32 AM9/5/19
to
Did you check out the link referenced it the sample?

http://access.mvps.org/access/modules/mdl0015.htm

It includes very simple code that writes a text file (script) and FTP.EXE to execute the script. No table or forms.

samxj...@gmail.com

unread,
Sep 5, 2019, 9:11:22 AM9/5/19
to
FTP.exe is a command line program in Windows that you can use interactively. When you enter FTP ftp.amazecreations.com at the command line, the 14 year old site times out instead of asking for your userid and password.

Test the FTP server you are trying to connect to manually from the command line first. You'll need the name of the server, userid and password. Next, build a batch file that opens a script. The Database Journal and MVPS links both outline this technique. Third, you can use VBA to create the batch and script files and call the batch from Access as outlined in Database Journal.

I have found WinSCP from https://winscp.net/eng/docs/guide_automation to be a more reliable and flexible FTP client than FTP.exe. With it, you can put all the commands on one line and avoid having to create the text files.

Ron Weiner

unread,
Sep 5, 2019, 10:56:03 AM9/5/19
to
After serious thinking PW wrote :
> ---
> This email has been checked for viruses by AVG.
> https://www.avg.com

Try this link http://access.mvps.org/access/modules/mdl0037.htm

Look for the Internet Data Transfer Library. Download the
InetTransferLib.zip File. In the Zip you will fine a file
"InetTransferLib.mda". I believe that this is in an Access 97 File
Format, so you will have to convert it to a Access 2000 or later format
to open it.

In any case there is a complete Access FTP class in that DB that I have
been using for more than 15 years in my Access projects. The class is
an Access only thing that does not require any external libraries,
ActiveX thing-a-ma-gigs, or anything else for that matter.

It was written by Dev Anish and Terry Kreft in the late 90's, so it has
been around for a while. I am surprised that you haven't come across
it in your investigation. Invest a little time in learning how to use
the class (I think there is some sample code), and you'll have a stable
foundation for your project.

Rdub

PW

unread,
Sep 5, 2019, 3:37:10 PM9/5/19
to
*---

Hi,

The zip file contained:

InetTransfer sample.mdb (with a space)
InetTransferLib.mda

I converted both to .accdb (A2007 format was chosen by Access even
though I am using 2010 - I guess they are the same from what I
remember)

I got an error message running the TestFTPUpload code behind the FTP
Upload button on the sample accdb "cannot find project or library" on
the line Dim objFTP As InetTransferLib.FTP

I tried to add a reference to InetTransferLib.accdb (was .mda) and was
unable: "Name conflicts with existing module, project, or object
library".

So, it is unusable so far.

Any ideas?

-paulw

Ron Weiner

unread,
Sep 5, 2019, 3:49:11 PM9/5/19
to
PW formulated on Thursday :
The MDA is (was) an Access Addin DB. Try importing all of the classes
and Modules that were in the MDA into the main ACCDB. Then re-try the
sample code. I guess that Access no longer supports MDA's. Fact is I
never used the MDA, I always imported the FTP Class directly into any
Access projects that needed to have FTP capability.

It was many years ago, and I seem to remember that there were some
rough spots that needed to be worked around, but in the end I was able
to move files hither and yon errorlessly.

Rdub

PW

unread,
Sep 5, 2019, 4:45:39 PM9/5/19
to
*---

Looks promising so far. Do you know if I can do this within Access?

Also, we have some clients that use our software running on Amazon Web
Services as is. I wonder if once I get this FTP stuff working whether
it will also work there.

Thanks!

-paulw

PW

unread,
Sep 5, 2019, 4:56:17 PM9/5/19
to
On Thu, 5 Sep 2019 06:11:17 -0700 (PDT), samxj...@gmail.com wrote:

*--

So Sam, and others, what I am trying to do is upload a file to
someone's server where their website is.

I have created an Access form (etc...) to export available rooms to a
.csv file. The people that did their website have created a web form
to import a .csv file so they can display the availability dates on it
(or at least that is what they say).

So it is just updating one file for now and overwriting the old file
if one exists. I guess eventually I may want to download a file (maybe
bookings) into Access.

Thanks,

-paulw

PW

unread,
Sep 6, 2019, 11:59:42 AM9/6/19
to
*---

I imported all the modules from the converted mda file into
intettransfer sample.mdb but I still get that error when running the
test upload button on the sample form.

I am not sure how to copy all the classes from the object browser but
they look the same to me in both accdb files.

-paulw

PW

unread,
Sep 6, 2019, 12:07:52 PM9/6/19
to
On Thu, 5 Sep 2019 04:55:28 -0700 (PDT), Ron Paii <ron8...@gmail.com>
wrote:
Hi Ron,

I put the only code that was not commented out behind a button and it
did not look like it did anything:


Dim stSysDir As String
stSysDir = Environ$("COMSPEC")
stSysDir = Left$(stSysDir, Len(stSysDir) - Len(Dir(stSysDir)))
Call Shell(stSysDir & "ftp.exe -s:" & stSCRFile, vbNormalFocus)
End Sub

-paul

PW

unread,
Sep 6, 2019, 2:05:12 PM9/6/19
to

>I have found WinSCP from https://winscp.net/eng/docs/guide_automation to be a more reliable and flexible FTP client than FTP.exe. With it, you can put all the commands on one line and avoid having to create the text files.

I installed it. As far as I can tell so far, it is just another ftp
client like cuteftp, filezilla,....

I want to be able to ftp from within our Access 2010 application.

Thanks!

-paulw

Patrick Finucane

unread,
Sep 8, 2019, 3:35:38 PM9/8/19
to

Ron Weiner

unread,
Sep 8, 2019, 4:05:20 PM9/8/19
to
on 9/6/2019, PW supposed :
You are going to have to modify the code as there is no longer an
InetTransferLib.ftp associated with you project. There is however a
FTP class that you imported from the MDA. If the name of the class os
cFTP Try:

Dim objFTP As cFTP
instead of
Dim objFTP As InetTransferLib.FTP

Later one the nthe code path there will be a statement something like:
Set objFTP = New InetTransferLib.FTP

You will also need to change that to something like:
Set objFTP = New cFTP

What you aew looking to do is not a standard Access DB "thing". Be
prepared to make changes in what you were given, to get it working.
Don't be afraid to try shit. What's the worst that can happen? What
you have now is aparently not workng, so what the hell. :-)

I assure you that the basic code you have in front of you WILL WORK, as
I started using this class when I was in my 50's. I am now a retired
septuagenarian, and my Access Apps that use it are still in service.
Don't give up!!!

Rdub

PW

unread,
Sep 8, 2019, 11:02:43 PM9/8/19
to
I am going to study that Patick! Thanks!

-paulw

Ron Paii

unread,
Sep 9, 2019, 8:33:09 AM9/9/19
to
The commented out code writes the FTP script that Shelling to FTP.exe will execute. You will need to edit it with your FTP server information and create the script file.

PW

unread,
Sep 10, 2019, 1:43:32 PM9/10/19
to

>> Hi Ron,
>>
>> I put the only code that was not commented out behind a button and it
>> did not look like it did anything:
>>
>>
>> Dim stSysDir As String
>> stSysDir = Environ$("COMSPEC")
>> stSysDir = Left$(stSysDir, Len(stSysDir) - Len(Dir(stSysDir)))
>> Call Shell(stSysDir & "ftp.exe -s:" & stSCRFile, vbNormalFocus)
>> End Sub
>>
>> -paul
>
>The commented out code writes the FTP script that Shelling to FTP.exe will execute. You will need to edit it with your FTP server information and create the script file.


*---

I do not know how to create a script file!

-paulw

Ron Paii

unread,
Sep 10, 2019, 3:38:51 PM9/10/19
to
For testing you can use any text editor. the following sample code will write the sample and return the script file name.

Function WriteFtpScript() As String
On Error GoTo errWriteFtpScript

Dim iFileNumber As Variant
Dim ftpScriptFileName As String

ftpScriptFileName = "c:\Temp\GetDeadLetter.scr"

iFileNumber = FreeFile

' Open will fail if file exist
Open ftpScriptFileName For Output As iFileNumber

' See: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ftp
' See: https://docs.microsoft.com/en-us/previous-versions/orphan-topics/ws.10/cc772966%28v%3dws.10%29
' See: https://www.c3scripts.com/tutorials/msdos/ftp.html

Print #iFileNumber, "lcd c:\temp" ' Set local directory
Print #iFileNumber, "open ftp.someserver.com" ' Connect to FTP Server
Print #iFileNumber, "anonymous" ' User name
Print #iFileNumber, "das...@hotmail.com" ' Password
Print #iFileNumber, "cd public" ' FTP directory
Print #iFileNumber, "binary" ' Binary Transfer
Print #iFileNumber, "get dead.letter my.letter" ' Download Dead.Letter to c:\temp\my.letter
Print #iFileNumber, "bye" ' Disconnect from FTP server

Close #iFileNumber

WriteFtpScript = ftpScriptFileName

doneWriteFtpScript:
On Error Resume Next
Close #iFileNumber
Exit Function

errWriteFtpScript:
Debug.Print Err.Number & ", " & Err.Description
WriteFtpScript = False
Resume doneWriteFtpScript
End Function

PW

unread,
Sep 11, 2019, 5:32:36 PM9/11/19
to
Still struggling to get anything to work.

But if something is using a dos command, I don't think that is going
to work with our clients that are running our application on the web
using Amazon Web Services.

Thanks,

-paulw

Ron Paii

unread,
Sep 12, 2019, 9:04:52 AM9/12/19
to
That's an important bit of information! All these solutions were for a Windows 7,8,10 workstation.

PW

unread,
Sep 12, 2019, 12:46:53 PM9/12/19
to
On Tue, 03 Sep 2019 21:32:40 -0700, PW <P...@noemailaddress.com> wrote:

*---

Finally found something that works! Nothing fancy needed. No
libraries, external files, objects,.....

http://myaccesstips.com/Functionality/ftp.html

Clear, straight-forward, conscise code that takes up one page or less,
with comments. It uses a command window to run like some others that
I have seen. Might not work with our application running on AWS but
this client is using it on their desktop.

Now what I have to do is:

1) Use FTP with TLS/SSL. The code is for straight FTP and I received
an error in the command window that I have to use TLS/SSL which I knew
I had to with them. The tech guy says I can use this flag to enable
TLS on when signing in -explicittls

2) Go to an http:// address to say that the file has been updated
("http://ourclientname.com//?resv_do_import_dates=true")

3) Run a program that I downloaded like this: " c:\curl
http://someurl.com"

Not sure if I can figure that all out but at least I was able to
upload a file to where our website is hosted!!! Nice!!

-paulw

PW

unread,
Sep 12, 2019, 1:15:50 PM9/12/19
to
*---

Oops. Here is his code:

Function FTP_Data()
'=========================================================================
'FTP from Microsoft Access
'by Matthew V Carmichael
'Craetes FTP Batch File, FTP command file (txt)
'Default directory location of files to upload/download is
'the same location as the mdb file that contains this module.
'========================================================================='
On Error GoTo Err_Trap

Dim pFile As Long
Dim strPath As String
Dim strFileName As String
Dim ftpServer As String
Dim strUserName As String
Dim strPassword As String

'Path and Name of file to FTP
strPath = CurrentProject.Path & "\"
strFileName = "Test.mdb" 'Name of file to upload
'FTP Server Settings
ftpServer = "Your FTP Server"
strUserName = "Your FTP User Name"
strPassword = "Your FTP Password"

'Create text file containing FTP commands
pFile = FreeFile
Open strPath & "FTP_cmd.txt" For Output As pFile
Print #pFile, "user"
Print #pFile, strUserName
Print #pFile, strPassword
Print #pFile, "Put " & strFileName
'Use the Put command to upload, use the Get command to download.
'Print #pFile, "Get " & "Your File Name"
Print #pFile, "quit"
Close pFile

'Create batch file to execute FTP
pFile = FreeFile
Open strPath & "FTP_Run.bat" For Output As pFile
Print #pFile, "ftp -n -s:" & "FTP_cmd.txt " & ftpServer
Print #pFile, "Pause"
Close pFile

'Execute FTP command
Shell strPath & "FTP_Run.bat", 1

Err_Trap_Exit:
Exit Function

Err_Trap:
MsgBox Err.Number & " - " & Err.Description
Resume Err_Trap_Exit

End Function

PW

unread,
Sep 12, 2019, 4:38:32 PM9/12/19
to

>That's an important bit of information! All these solutions were for a Windows 7,8,10 workstation.


*--

Hi Ron.

I think I have said all along that we have clients that use our
software on AWS and these solutions would most likely not work.

But except for a few things, everything works on AWS without us having
to rewrite one line of code.

However, we also have Windows desktop clients and this particular
client is one of them.

I think I have found a more simple solution for the desktop using
Windows command interface to doing it with FTP. So much more simpler
than the other solutions I have studied and experiented for many days
and hours. I posted the link and the code from this person today here
in this thread.

However, I need to figure out how to learn how to use Explicit TTLS
instead of regular FTP (which worked for the server that we have our
website on but errors out on the clients because they require
encryption).

And a few other things that their IT guys want us to do. So many
steps that I think probably not needed. Has anyone heard of Curl?

I researched it and it seems to be some type of ftp program from the
90s. Why they require us to use that also is beyond me!

Thank you so much!

-paul

PW

unread,
Sep 14, 2019, 2:01:33 PM9/14/19
to

I waz wrong! This one is flakey. It will write the file once, then
never again for a while. Then sometimes the FTP batch file will run
but only the FTP and command switches appear and nothing gets run at
the prompt.

It creates two files:

A text file that is run (I have removed my credentials). The xxxxx are
first user name and the next password. I have no idea why it contains
the text "user".

user
xxxxx
xxxxx
Put uploadfile.txt
quit

And the batch file:

ftp -n -s:FTP_cmd.txt 12.123.123.123
Pause

Sorry for the excited post!

-paulw

PW

unread,
Sep 16, 2019, 2:02:51 PM9/16/19
to
When typing this in a cmd window:
cd c:\ftpuploadfiles
ftp 12.123.123.123
user name
password

"ok. current restricted directory is /"

cd public_html

"current directory is public_html" (the folder where my website files
are located)

binary

"200 TYPE is now 8-bit binary"

put uploadfile.txt

"500 I won't open a connection to 192.168.... only to 192.161..."

I assumed those are my PCs IP numbers but they are not. I turned off
my firewall but same error message

Any ideas?

-paulw

PW

unread,
Sep 20, 2019, 7:03:42 PM9/20/19
to
WinSCP is another flawed product.

It will generate a script file or batch file that contains a bunch of
garbage and what ever one I use in the user interface by itself will
not update the file!!!

I have wasted so many, hours and hours trying to do this within MS
Access and bothered you all here and wasted your time also.

Here are the batch file and script file that WinSCP generates:

Batch file:

@echo off

"H:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul ^
/command ^
"open ftpes:

^
"lcd C:\ftpuploadfiles" ^
"cd /" ^
"put uploadfile.txt" ^
"exit"

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)

exit /b %WINSCP_RESULT%

*---

There is no such folder on my computer and it errors out because of
that! Why is the log file needed..

ftpes is not a valid command in Windows! I commented that line out
because of security reasons, but trust me.

Next:

The script file:

open
ftpes://lodgeical%40thedestination.com:%21wrHg_n%28RmXbq4%25%2...@threeforksranch.com/
-certificate="a4:5b:da:c9:48:f2:66:04:ea:e4:91:42:f6:9c:26:5c:c7:bf:e4:39"

lcd C:\ftpuploadfiles
cd /

put uploadfile.txt

exit

# Execute the script using a command like:
# "H:\Program Files (x86)\WinSCP\WinSCP.exe"
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul
/script="C:\path\to\script\script.txt"


Obviously, I changed the website name.

I assume the pound sign is a comment line and I have no idea, again,
what the "C:\writeable..." means!! Again, that folder doe not exist!

I have followed the instructions to create both a bat and scr file to
the letter!

This is another flawed product for what I want to do. Someone here
recommend that I try it.

I have spent hours and hours and hours trying suggestions here (thank
you everyone!) but I do not think what I want to do is possible using
MS Access. I guess it is for desktop applications only.

All of this effort that I have spent so much of my time and yours is
for one client!

-pw


PW

unread,
Sep 20, 2019, 7:30:41 PM9/20/19
to
On Tue, 03 Sep 2019 21:32:40 -0700, PW <P...@noemailaddress.com> wrote:

>Hi,
>
>Has anyone successfully done this?
>
>I found a link with a download sample, nice form and docs, but it does
>not work because two files that are needed to run it are not in the
>zip file
>(https://www.databasejournal.com/features/msaccess/article.php/3513061/Simple-FTP-Methods-from-Microsoft-Access.htm)
>
>Thanks,
>
>-paulw


*--

Check this link out:

https://bytes.com/topic/access/answers/452957-run-batch-file-microsoft-access

Another wild goose chase!

-pw

Phil Hunt

unread,
Sep 23, 2019, 12:37:51 PM9/23/19
to
Why don't you google FTP WITHOUT Access. It is really not a Access function.
Probably you will find something in the VB forum


"PW" <P...@noemailaddress.com> wrote in message
news:k8oaoe5r4hjdf7gbr...@4ax.com...

PW

unread,
Sep 23, 2019, 7:27:41 PM9/23/19
to
On Mon, 23 Sep 2019 12:37:42 -0400, "Phil Hunt" <a...@nowhere.com>
wrote:

>Why don't you google FTP WITHOUT Access. It is really not a Access function.
>Probably you will find something in the VB forum
>
>

Without something running from our Access 2010 application? Instead
have the client boot up another program to do so? After having to
bring it up exit it?

I do not think that would be professional.

I am making ways with winSCP but all I have to do is have them install
it by us remotely. I am able now to upload a file securely using it
but I have to also bring up a couple HTML websites for them so that
they can see that a file has been updated to their website, then
figure out this CURL thing!

I do not have any idea why there are so many steps to get this done
outside of Access or maybe I can do it like I just did with winSCP.

Thanks!!

-pw

Patrick Finucane

unread,
Sep 23, 2019, 8:57:01 PM9/23/19
to
Do you have to use Access to do the FTP? I did a google search on How to FTP a File Using Python. I also did one How to FTP a File Using A Web Page. Maybe there are alternatives you can use.

PW

unread,
Sep 23, 2019, 10:47:04 PM9/23/19
to
>
>Do you have to use Access to do the FTP? I did a google search on How to FTP a File Using Python. I also did one How to FTP a File Using A Web Page. Maybe there are alternatives you can use.


*--

Hi Patrick,

I think it must be through our Access 2010 application rather than
have our clients boot up something else to accomplish every step I
need to do.

I will search for the same thing.

Thanks!

-paulw

Phil Hunt

unread,
Sep 24, 2019, 8:47:57 AM9/24/19
to
All of suggestions I see here is either using some external library or using
DOS. It is very similar to adding funtionality to VB application. So a VB
solution may work the same way in Access.



"PW" <P...@noemailaddress.com> wrote in message
news:aokioe13ukt8n7er3...@4ax.com...

Ron Weiner

unread,
Sep 24, 2019, 1:55:38 PM9/24/19
to
Phil Hunt formulated on Tuesday :
> All of suggestions I see here is either using some external library or using
> DOS. It is very similar to adding funtionality to VB application. So a VB
> solution may work the same way in Access.
>
>
>
> "PW" <P...@noemailaddress.com> wrote in message
> news:aokioe13ukt8n7er3...@4ax.com...

Except for the solution I posted a while ago that is a 100% all Access
solution. I have been using this code for well over a decade in
several Access apps.

The OP claims that the code he downloaded doesn’t work. I do not doubt
that, as the code was submitted when Access was version 97. I do not
understand the OP's reluctance to roll up his sleeves dig into the code
and figure out how it works, so he can make the necessary changes.

Today code I wrote is working in (or has worked in) Access 97, 2000,
2003, 2007, 2010, and 2016.

Rdub

PW

unread,
Sep 24, 2019, 5:57:37 PM9/24/19
to
Hi all!

First, thank you every one here who spent so much time trying to help
me with the first time trying to do this. That means everyone!

I used a combination of all of your suggestions and research that we
did together.

I finally succeded to:

-Transfer a file that the client can use to update their calendar on
their website.

-To do that, I used WinSCP. I realize many people use it but the
documentation that I had to search for on the web was confusing. Not
documentation that I would release to the public for sure!

-So now I am going to have the client install winSCP and walk them
through it our do it myself using a remote software.

-They or myself will have to create the batch file using winSCP. Not
what my goal was!

-The batch file that winSCP is invalid. It wants to create a log in a
directory that does not exist and into a file that doe not exist. No
matter if that option is unchecked in the crazy interface, it will
still do it when generating code for a batch file!

-After many errors running it, it finally dawned on me that I had to
delete the line that created it in a directory that does not exist and
a file that does not exist. And it worked!!

-I was able to do the whole thing via MS Access! I struggled with all
the suggestions here to run a batch file until I finally stumblled
upon this guys website. I was ready to quit but check it out:

Option Compare Database

'---------------------------------------------------------------------------------------
' Procedure : RunFile
' Author : CARDA Consultants Inc.
' Website : http://www.cardaconsultants.com
' Purpose : Run/Execute files from vba (bat, vbs,…)
' Copyright : The following may be altered and reused as you wish so
long as the
' copyright notice is left unchanged (including Author,
Website and
' Copyright). It may not be sold/resold or reposted on
other sites (links
' back to this site are allowed).
' Input Variables:
' ~~~~~~~~~~~~~~~~
' strFile - full path including filename and extension
' strWndStyle - style of the window in which the program is to be run
' value can be vbHide,vbNormalFocus,vbMinimizedFocus
' vbMaximizedFocus,vbNormalNoFocus or vbMinimizedNoFocus
' Usage Example:
' ~~~~~~~~~~~~~~~~
' RunFile("c:\test.bat", vbNormalFocus)
' Revision History:
' ~~~~~~~~~~~~~~~~
' Rev Date(yyyy/mm/dd) Description
'
**************************************************************************************
' 1 2010-Feb-05 Initial Release
'---------------------------------------------------------------------------------------
Function RunFile(strFile As String, strWndStyle As String)

On Error GoTo Error_Handler

Shell "cmd /k """ & strFile & """", strWndStyle

Error_Handler_Exit:
On Error Resume Next
Exit Function

Error_Handler:
MsgBox "MS Access has generated the following error" & vbCrLf &
vbCrLf & "Error Number: " & _
Err.Number & vbCrLf & "Error Source: RunFile" & vbCrLf & "Error
Description: " & _
Err.Description, vbCritical, "An Error has Occured!"
Resume Error_Handler_Exit
End Function


*---

Now I can transfer a encrypted file to the client's website, have the
DOS window not appear and also I can connect to a website to say that
it was updated using the HyperlinkkAddress in Access that will open in
the default browser.

But, of course, things can change in a day or so!! :-)

My wife is trying to get them on AWS -i.e. the could. May not work,
but it was a frustrating but rewarding process!!!

Yes, we are a husband and wife team!! Imagine that!


Thank you all! I will start another thread soon when what I did no
longer works! LOL!

-paulw

PW

unread,
Sep 24, 2019, 6:23:45 PM9/24/19
to
----

Why don't you check out what we have managed to produce with MS
Access!

lodge-ical.com

It is all written in MS Access and we did it starting with 1997.

Thanks for the help.

-paulw

Patrick Finucane

unread,
Sep 25, 2019, 12:57:58 PM9/25/19
to
So is the W in your name Williamson? Is that an Access designed web site? Is that what you are working on? Quite creative/artistic/pleasant layout if so.

PW

unread,
Sep 25, 2019, 5:28:55 PM9/25/19
to
On Tue, 24 Sep 2019 13:55:32 -0400, Ron Weiner <r...@domain.com> wrote:

*---

How would what you have accomplished work with a secure FTP website
(FTPS or whatever)?

I have tried typing that command in a DOS prompt but it does not work.

This client has to have a secure, encrypted connection.

I managed to do what I want to do using winSCP to generate a
non-working batch file that I had to edit to get it to work after some
time to make it work. And it will also generate a script file but I
had no luck getting a .scr file to run within MS Access.

So now we have to have the client install winSCP and have them
generate the .bat file that we need to run. Granted, it hopefully is
a one time thing but I bet it won't be!

That code that I spent hours and hours only to find out that it does
not work ( internettransferlib and many others).

I wish it would work without another application being installed and
have to deal with, but it does not.

-paulw

PW

unread,
Sep 25, 2019, 7:17:34 PM9/25/19
to
>> ----
>>
>> Why don't you check out what we have managed to produce with MS
>> Access!
>>
>> lodge-ical.com
>>
>> It is all written in MS Access and we did it starting with 1997.
>>
>> Thanks for the help.
>>
>> -paulw
>
>So is the W in your name Williamson? Is that an Access designed web site? Is that what you are working on? Quite creative/artistic/pleasant layout if so.


*--

No Patrick.

I did it with Adobe Dreamweaver with a bunch of extentions from a
third party ( projectseven).

I do not like WordPress, Wix, etc.. at all! SquareSpace seems to be
for the "creative" type. I do not run an art gallery or anything
similiar!

Thank you!!!!

-paullw
0 new messages