Create a global module to run a menu command from the menu bar

  • Thread starter cesemj via AccessMonster.com
  • Start date
C

cesemj via AccessMonster.com

Hello is there a way to write this as a module that I can call from the menu
bar:

Public Sub cmdDataRefresh_Click()

'Step 1 Start FTP Download Process
Dim FileName As String
Dim FilePath As String

Call Transmit_FTP(FilePath, FileName)


Modulename: FtpTransmit (This modules downloads data from an FTP server)
**************************************************************************************
Option Compare Database

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Public Function Write_FTP_Script(Path As String, FileName As String)

Dim db As Database
Dim rs As Recordset
Dim SQL As String

Dim FileNum As Integer
Dim SCPFileName As String
Dim Directory As String
Dim OutputLine As String


SCPFileName = "FTP.SCP"



*******************************************************8
Current test code that does not work when called from an immediate function.
Any suggestions:

Public Function cmdFtp_Click()

Call cmdFtp_Click

End Function
 
A

Alex Dybenko

Hi,
looks like you calling function from itself:
Public Function cmdFtp_Click()

Call cmdFtp_Click

End Function

if order to call a function form menu bar - you have to make a public
function in common module (not form's class module)

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top