Form Not Visible

D

DS

I'm running the following code, the problem is the "Transmitting"
doesn't completly load untill the code runs. It kinda half loads, you
see the frame but not the form itself. I tried acDialog but that wants
you to respond. I just need it to load and disappear after the code runs.
Thanks
DS



Private Sub ImageSend_Click()
DoCmd.OpenForm "Transmitting"
'1 Allergys
DoCmd.TransferText acExportDelim, , "Allergys",
"C:\DX\TFILE\DX1Allergys.txt", False
'2 AllergyTypes
DoCmd.TransferText acExportDelim, , "AllergyTypes",
"C:\DX\TFILE\DX1AllergyTypes.txt", False
'3 CouponType
DoCmd.TransferText acExportDelim, , "CouponType",
"C:\DX\TFILE\DX1CouponType.txt", False
'4 Customers
DoCmd.TransferText acExportDelim, , "Customers",
"C:\DX\TFILE\DX1Customers.txt", False
'5 DeleteTypes
DoCmd.TransferText acExportDelim, , "DeleteTypes",
"C:\DX\TFILE\DX1DeleteTypes.txt", False
'6 Departments
DoCmd.TransferText acExportDelim, , "Departments",
"C:\DX\TFILE\DX1Departments.txt", False
'7 Deposits
DoCmd.TransferText acExportDelim, , "Deposits",
"C:\DX\TFILE\DX1Deposits.txt", False
'8 DiscountTypes
DoCmd.TransferText acExportDelim, , "DiscountTypes",
"C:\DX\TFILE\DX1DiscountTypes.txt", False
'9 EMail
DoCmd.TransferText acExportDelim, , "Email",
"C:\DX\TFILE\DX1EMail.txt", False
'10 Employess
DoCmd.TransferText acExportDelim, , "Employees",
"C:\DX\TFILE\DX1Employees.txt", False
'11 Faxes
DoCmd.TransferText acExportDelim, , "Faxes",
"C:\DX\TFILE\DX1Faxes.txt", False
'12 Info
DoCmd.TransferText acExportDelim, , "Info",
"C:\DX\TFILE\DX1Info.txt", False
'13 Items
DoCmd.TransferText acExportDelim, , "Items",
"C:\DX\TFILE\DX1Items.txt", False
'14 JobNames
DoCmd.TransferText acExportDelim, , "JobNames",
"C:\DX\TFILE\DX1JobNames.txt", False
'15 JobsEmps
DoCmd.TransferText acExportDelim, , "JobsEmp",
"C:\DX\TFILE\DX1JobsEmp.txt", False
'16 Levels
DoCmd.TransferText acExportDelim, , "Levels",
"C:\DX\TFILE\DX1Levels.txt", False
'17 MenuCats
DoCmd.TransferText acExportDelim, , "MenuCats",
"C:\DX\TFILE\DX1MenuCats.txt", False
'18 MenuDetails
DoCmd.TransferText acExportDelim, , "MenuDetails",
"C:\DX\TFILE\DX1MenuDetails.txt", False
'19 MenuInfo
DoCmd.TransferText acExportDelim, , "MenuInfo",
"C:\DX\TFILE\DX1MenuInfo.txt", False
'20 Menus
DoCmd.TransferText acExportDelim, , "Menus",
"C:\DX\TFILE\DX1Menus.txt", False
'21 ModCats
DoCmd.TransferText acExportDelim, , "ModCats",
"C:\DX\TFILE\DX1ModCats.txt", False
'22 PartyPlanner
DoCmd.TransferText acExportDelim, , "PartyPlanner",
"C:\DX\TFILE\DX1PartyPlanner.txt", False
'23 PayApplied
DoCmd.TransferText acExportDelim, , "PayApplied",
"C:\DX\TFILE\DX1PayApplied.txt", False
'24 PayIns
DoCmd.TransferText acExportDelim, , "PayIns",
"C:\DX\TFILE\DX1PayIns.txt", False
'25 PayInTypes
DoCmd.TransferText acExportDelim, , "PayInTypes",
"C:\DX\TFILE\DX1PayInTypes.txt", False
'26 PayName
DoCmd.TransferText acExportDelim, , "PayName",
"C:\DX\TFILE\DX1PayName.txt", False
'27 Payouts
DoCmd.TransferText acExportDelim, , "Payouts",
"C:\DX\TFILE\DX1Payouts.txt", False
'28 PayoutTypes
DoCmd.TransferText acExportDelim, , "PayoutTypes",
"C:\DX\TFILE\DX1PayoutTypes.txt", False
'29 PayTypes
DoCmd.TransferText acExportDelim, , "PayTypes",
"C:\DX\TFILE\DX1PayTypes.txt", False
'30 PCenter
DoCmd.TransferText acExportDelim, , "PCenter",
"C:\DX\TFILE\DX1PCenter.txt", False
'31 PrepSequence
DoCmd.TransferText acExportDelim, , "PrepSequence",
"C:\DX\TFILE\DX1PrepSequence.txt", False
'32 Printers
DoCmd.TransferText acExportDelim, , "Printers",
"C:\DX\TFILE\DX1Printers.txt", False
'33 PrintRouting
DoCmd.TransferText acExportDelim, , "PrintRouting",
"C:\DX\TFILE\DX1PrintRouting.txt", False
'34 PrivAssign
DoCmd.TransferText acExportDelim, , "PrivAssign",
"C:\DX\TFILE\DX1PrivAssign.txt", False
'35 RefundTypes
DoCmd.TransferText acExportDelim, , "RefundTypes",
"C:\DX\TFILE\DX1RefundTypes.txt", False
'36 ReportCats
DoCmd.TransferText acExportDelim, , "ReportCats",
"C:\DX\TFILE\DX1ReportCats.txt", False
'37 Sales
DoCmd.TransferText acExportDelim, , "Sales",
"C:\DX\TFILE\DX1Sales.txt", False
'38 SalesCats
DoCmd.TransferText acExportDelim, , "SalesCats",
"C:\DX\TFILE\DX1SalesCats.txt", False
'39 SalesDetails
DoCmd.TransferText acExportDelim, , "SalesDetails",
"C:\DX\TFILE\DX1SalesDetails.txt", False
'40 Sections
DoCmd.TransferText acExportDelim, , "Sections",
"C:\DX\TFILE\DX1Sections.txt", False
'41 Tax
DoCmd.TransferText acExportDelim, , "Tax",
"C:\DX\TFILE\DX1Tax.txt", False
'42 Terminal
DoCmd.TransferText acExportDelim, , "Terminal",
"C:\DX\TFILE\DX1Terminal.txt", False
'43 TermType
DoCmd.TransferText acExportDelim, , "TermType",
"C:\DX\TFILE\DX1TermType.txt", False
'44 TimeLog
DoCmd.TransferText acExportDelim, , "TimeLog",
"C:\DX\TFILE\DX1TimeLogs.txt", False
'45 Users
DoCmd.TransferText acExportDelim, , "Users",
"C:\DX\TFILE\DX1Users.txt", False
'46 VoidReasons
DoCmd.TransferText acExportDelim, , "VoidReasons",
"C:\DX\TFILE\DX1VoidReasons.txt", False

'Send Files
Const cdoSendUsingPort = 2
Const cdoBasic = 1
Dim objCDOConfig As Object, objCDOMessage As Object
Dim strSch As String

strSch = "http://schemas.microsoft.com/cdo/configuration/"
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = cdoSendUsingPort
.Item(strSch & "smtpserver") = "mail.optonline.net"
' Only used if SMTP server requires Authentication
.Item(strSch & "smtpauthenticate") = cdoBasic
.Item(strSch & "sendusername") = "Bootybox"
.Item(strSch & "sendpassword") = "333333"
.Update
End With

Set objCDOMessage = CreateObject("CDO.Message")
With objCDOMessage
Set .Configuration = objCDOConfig
.FROM = "Site 1"
.sender = "(e-mail address removed)"
.to = Forms!DX!EmailAddress
.Subject = Date & "" & "Site 1 Famous Restaurant"
' Use TextBody to send Email in Plain Text Format
'.TextBody = "This is a test for CDO message"
' Use HTMLBody to send Email in Rich Text (HTML) Format
.HTMLBody = "Todays Update!"
' Adding Attachments is easy enough
.AddAttachment "C:\DX\TFILE\DX1Allergys.txt"
.AddAttachment "C:\DX\TFILE\DX1AllergyTypes.txt"
.AddAttachment "C:\DX\TFILE\DX1CouponType.txt"
.AddAttachment "C:\DX\TFILE\DX1Customers.txt"
.AddAttachment "C:\DX\TFILE\DX1DeleteTypes.txt"
.AddAttachment "C:\DX\TFILE\DX1Departments.txt"
.AddAttachment "C:\DX\TFILE\DX1Deposits.txt"
.AddAttachment "C:\DX\TFILE\DX1DiscountTypes.txt"
.AddAttachment "C:\DX\TFILE\DX1Email.txt"
.AddAttachment "C:\DX\TFILE\DX1Employees.txt"
.AddAttachment "C:\DX\TFILE\DX1Faxes.txt"
.AddAttachment "C:\DX\TFILE\DX1Info.txt"
.AddAttachment "C:\DX\TFILE\DX1Items.txt"
.AddAttachment "C:\DX\TFILE\DX1JobNames.txt"
.AddAttachment "C:\DX\TFILE\DX1JobsEmp.txt"
.AddAttachment "C:\DX\TFILE\DX1Levels.txt"
.AddAttachment "C:\DX\TFILE\DX1MenuCats.txt"
.AddAttachment "C:\DX\TFILE\DX1MenuDetails.txt"
.AddAttachment "C:\DX\TFILE\DX1MenuInfo.txt"
.AddAttachment "C:\DX\TFILE\DX1Menus.txt"
.AddAttachment "C:\DX\TFILE\DX1ModCats.txt"
.AddAttachment "C:\DX\TFILE\DX1PartyPlanner.txt"
.AddAttachment "C:\DX\TFILE\DX1PayApplied.txt"
.AddAttachment "C:\DX\TFILE\DX1PayIns.txt"
.AddAttachment "C:\DX\TFILE\DX1PayInTypes.txt"
.AddAttachment "C:\DX\TFILE\DX1PayName.txt"
.AddAttachment "C:\DX\TFILE\DX1Payouts.txt"
.AddAttachment "C:\DX\TFILE\DX1PayoutTypes.txt"
.AddAttachment "C:\DX\TFILE\DX1PayTypes.txt"
.AddAttachment "C:\DX\TFILE\DX1PCenter.txt"
.AddAttachment "C:\DX\TFILE\DX1PrepSequence.txt"
.AddAttachment "C:\DX\TFILE\DX1Printers.txt"
.AddAttachment "C:\DX\TFILE\DX1PrintRouting.txt"
.AddAttachment "C:\DX\TFILE\DX1PrivAssign.txt"
.AddAttachment "C:\DX\TFILE\DX1RefundTypes.txt"
.AddAttachment "C:\DX\TFILE\DX1ReportCats.txt"
.AddAttachment "C:\DX\TFILE\DX1Sales.txt"
.AddAttachment "C:\DX\TFILE\DX1SalesCats.txt"
.AddAttachment "C:\DX\TFILE\DX1SalesDetails.txt"
.AddAttachment "C:\DX\TFILE\DX1Sections.txt"
.AddAttachment "C:\DX\TFILE\DX1Tax.txt"
.AddAttachment "C:\DX\TFILE\DX1Terminal.txt"
.AddAttachment "C:\DX\TFILE\DX1TermType.txt"
.AddAttachment "C:\DX\TFILE\DX1TimeLog.txt"
.AddAttachment "C:\DX\TFILE\DX1Users.txt"
.AddAttachment "C:\DX\TFILE\DX1VoidReasons.txt"

'.AddAttachment "c:\SomeOtherFile.pdf"
' Un-Rem next line to get "Return Reciept Request"
'.MDNRequested = True
.Send
End With
Set objCDOMessage = Nothing
Set objCDOConfig = Nothing
DoCmd.Close acForm, "Transmitting"
DoCmd.Close acForm, "DX"
'DoCmd.OpenForm "ProServ"
 

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

Similar Threads

WildCard 16
DoEvents 3

Top