Send Report To MkDir Path

Dec 4, 2011

How to create a new folder through the MkDir function, but my problem is, I then need my report to go to the new folder I just created.

For example:
the path is = "VAIOUsersDocumentsTownship" & Me.[Owner Name].Value

When I try to send the report there.. it only goes to "VAIOUsersDocumentsTownship" and not the new folder created titled with the owner name... the Me.[Owner Name].Value ends up getting set as the name of my report, in addition to the report name which is defined as the number.

My actual code is listed below:

Private Sub cmdFileReceipt_Click()
Dim strMyPath As String
If Me.cboMun.Value = "C-Town" Then
strMyPath = "VAIOUsersDocumentsC-Town" & Me.[Owner Name].Value

[Code] .....

View Replies


ADVERTISEMENT

Modules & VBA :: How To Send Attachments Using Path Instead Of Attachment Field

Apr 6, 2014

I have some code that attaches any files that are in my attachment field on the current record in to a email this is great but I m starting to realise that this is take up way to much space as it hold a copy in the database and can t afford to go down the sql sever route so what I have done is added some new fields called path1, path2 ,path3 ,path4 and path5 now the user can add the files location to these text box instead of add them via the attachment field also I can now limit number attachments to each record

Code:
Private Sub cmdEmail2_Click()
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Dim OutlookAttach As Outlook.Attachment
Set appOutLook = CreateObject("Outlook.Application")

[Code] ....

Some how I need to change this so it checks fields path1 path2 path3 path4 path5 on the current record and see if anything is entered in these textbox's and follow the paths and attach the files to email

How to make command button . How to add a file path to a text box

1. add new field to your table e.g "path1"
2. add the new field to your form
3 create new command button call it addpath
4 add code below to click on event

Code:
Private Sub addpath_Click()
Dim fDialog As Office.FileDialog
Dim varFile As Variant
' Clear listbox contents. '
Me.Path1.Value = ""
' Set up the File Dialog. '

[Code] ....

This will now save file location path to the path1 text box. To open file path

1.add another command button call it "pathopen"
2. add code below on click event

Code:
Private Sub pathopen_Click()
Application.FollowHyperlink Me.Path1
End Sub

View 2 Replies View Related

Reports :: Possible To Send Report As XLS And Keep Format Exactly As Report Looks

Jul 11, 2013

I am wondering if it is possible to send a report as xls file and keep the format exactly as the report looks.When I try to send it now, it automatically changes back to the column names from the table, which I in the report have changed and want to keep in my excel output!

View 3 Replies View Related

Reports :: Unbound Report - Print Preview OK But None Of Fields Print When Report Directly Send To Printer

May 25, 2013

I have an unbound form with an associated report. When the user hits the 'print' button on the form/screen, the report is launched in the background. In the On Load event of the report I populate the report fields from the forms field as so:

Code:
Me.txtAddrMainLine2 = "NAME " & UCase([Forms]![frm_OrderRx].[txtPatientName])

This works like a charm as long as I call the report in Print Preview mode (i.e. with acViewPreview). But if I send the report directly to the printer, none of the fields print.

I've read about using other report events to populate the fields (e.g., On Format and On Print) and also something about using TempVars to pass the data. But I haven't read anything that's clear and definitive about the full answer.

View 3 Replies View Related

Reports :: Adding Images To A Report - Only File Path Displaying

Oct 15, 2014

I have to add 2 company logos and a phone graphic to a report.

I can only seem to add one logo and if i try to copy and paste a graphic it just displays the file path.

View 3 Replies View Related

Save Reports To Defined Path In Path Field

May 26, 2014

Till now I managed to publish and save all in C:Reports. What I'm trying to do is Save to path specified in Path. DB attached.

Private Sub PrintAll_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim MyPath As String
Dim MyFileName As String

[Code] ....

View 6 Replies View Related

Modules & VBA :: Display Image On A Report Based On Path Saved To Each Record

Jul 25, 2013

I have a piece of code that I'm using to display an image on a report based on a path saved to each record. the code is:

Code:
Option Compare Database
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.ImagePath) Then
Me.ImgPic.Picture = "O:BellinghamIntranetProductionLabelsNo Label.bmp"
Else
Me.ImgPic.Picture = Me.ImagePath
End If
End Sub

It seems like every few months the code crashes access and then never works again. When I debug, the part that is highlighted is:

Code:
Me.ImgPic.Picture = Me.ImagePath

The only way i've found to correct it is to delete the report and the module and copy them back in from a backup database. What could be causing this code to crash or how to stabalize my database to prevent this from happening again.

View 14 Replies View Related

Help Needed To Send Report Via Email!!!

Sep 29, 2005

Hi Guys,

Im new to access and i have a problem!! I have a report that i need to be sent out monthly to 3 people. The problem is i dont know where to start. I have been looking through the forum, but nothing that i can get my head around, so there anyone out there who can help???????

Thanks in advance!!!

View 3 Replies View Related

Send 'Report' To Mail Recipient

Aug 18, 2004

I am trying to send an MS Access 'report' as an attachment to a mail recipient in rtf format without success. Everything seems to work fine except the 'send' button. Click away and nothing happens.... no error messages, no nothing. Any suggestions or tips on how to make this work?

Thanks...

View 2 Replies View Related

Modules & VBA :: Send Report Through Gmail

Nov 17, 2013

I use this to send email msgs through gmail, found it on the net somewhere, adapted a bit and it works.

Code:
Private Function fSendGmail() As Boolean 'Returns True if No Errors are Generated
On Error GoTo Err_ErrorHandler
fSendGmail = True
Const conStrPrefix As String = "http://schemas.microsoft.com/cdo/configuration/"
Const conCdoSendUsingPort As Integer = 2

[Code] ....

Err_ErrorHandler:
If Err.Number <> 0 Then fSendGmail = False etc, etc
End Function 'fSendGmail

I'd like to send report attached to this as pdf or rtf. How should I go about it. I know how to create pdf and save it.(DoCmd.OutputTo acOutputReport, "My Report", acFormatPDF, strPath, True) But where do I attach that here? Is it necessary to save the file first?

View 6 Replies View Related

Modules & VBA :: Send Report With Variable Name

Jan 8, 2015

I use a macro that attaches a document automatically to an e-mail address ready to send this report is governed by a query of which the criteria is " loss order number " this is in a pdf format of which I need if possible

The problem I have is the same pdf file keeps attaching itself to the e-mail no matter which loss order number I select. The reason I think is because the report is called NCR so it is not changing from the previous one. What I think can solve it but not sure and don't know how to do is get the " loss order number " within the report name.

If I just send the report to a file direct it does work as I am prompted for a file name

Can the loss order number get into the file name within a macro/vba

Code:
Name="EMailDatabaseObject
Name="ObjectType">Report
Name="ObjectName">SEND NCR
Name="OutputFormat">PDF Format (*.pdf
Name="To">=[E-mail Address] & IIf(Nz([E-mail Address

View 2 Replies View Related

Reports :: SEND SQL Parameters To Report

May 13, 2013

I have an SQL statement which is dynamically built on a form.

It can be truncated to read
[Colour] = 'Blue'

Or it can be left as a complete statement - SELECT * from tblOrders WHERE [Colour] = 'Blue'

The statements work when I open a form.

Is there a simple way to open a report (or query) with these parameters?

View 6 Replies View Related

Modules & VBA :: Add More People To Cc And Don't Send Report

Mar 5, 2015

I would like to put 3 more people on as a CC but don't send the report

Code:
Dim strTo As String
Dim strSubject As String
Dim strMessageText As String
Me.Dirty = False
strTo = Me.E_Mail_address

[Code] .....

View 4 Replies View Related

Reports :: Send Report As PDF With Macro

Sep 26, 2013

I want to sent out my report as a pdf file with my macro.. I've been trying to use the VBA

Code:
Option Compare Database

Sub Fix1()
DoCmd.SendObject acSendReport, "MarketRiskControl_HighestDiffs_AsOfCurrentDate", "PDFFormat(*.pdf)", "my mail@mail", "cc", , "SD Counterparty Report as of Current Date", "Regards, Trading Risk Control", False
End Sub

But this doesn't work, get run-time error 2282..

I am using access 02.

View 1 Replies View Related

Automatically Check Query And Send A Report

May 2, 2006

Good Day!

I have a simple table where the user enter expiry date for visa. User also enter return date of visa holder.

I am looking for a way whereby, every time I start my database a report is automatically sent if Visa Expiry daye is close to departure date.


I already have the query and the report based on it, but how to have this checked and sent?
This is in my query

VISA_CHECK: IIf([Visa_LOI_end_date]-[Return Date]<7,'Fail','Pass')

If it fails this should trigger the report being sent.

I hope I have been clear and that someone can help.

Thank you in Advance

Enrico

View 2 Replies View Related

Send Textbox/es Info To Parameter For Report

Nov 9, 2006

Ok I saw this posted up in the forum but it was not explained.

I have a Query which asks for a parameter before giving an output.

I have a report that uses this query to display the information.


Ok what I am trying to do is create a form that has a textbox and I enter the parameter's information in that textbox or textbox. How do I send the information to the query?

The reason for such a thing is people tend to not follow the set guidelines for putting stuff in a parameter box. So what I decided to do was set up a calendar form which a person has to physically choose the date from the calendar and this leaves no room for real error. My problem is I can get the calendar information to the textbox or textboxes but can't figure out how to code the button to send the textbox information to the query & parameters & report, etc...


Can someone please help me out of this situation? or point me to a starting point?

View 4 Replies View Related

Send Report From Access In A Body Of An E-mail

Dec 13, 2006

Could you please help me and advise if it's possible to send report from MS Access by mail - having report as a content of an e-mail instead of attachement?

View 2 Replies View Related

Modules & VBA :: How To Send A Report Via Outlook 2010

Oct 30, 2014

I have a VBA module in my Access 2010 database that will send a report as a PDF via email to a predetermined email address. the only problem using the docmd.sendobject method is i keep getting a pop up that says "A program is trying to send an e-mail on your behalf. If this is unexpected, click Deny and verify your antivirus software is up-to-date."

I have a windows task set up at the same time each day to open this database which runs an autoexec that creates this report and using my VBA module sends the email. i want it to just send the email without any imput from me. I want automation.

Here is my code that i am using to create and send the email

"Private Sub Report_Activate()
filename = "Name of file" & Format(Me.Date_time_returned "MMDDYY") & ".pdf"
DoCmd.SetWarnings False
DoCmd.SendObject acSendReport, "Name of file", acFormatPDF, "the destination email address goes here",,, "Request completed and sent " & Format(Me.Date_time_returned, "MMDDYY"), "Subject of email goes here", False
DoCmd.SetWarnings True
End Sub"

View 4 Replies View Related

Access 2007 / Send Report To A New File?

Nov 23, 2011

In Access 2007 there a way to send a report to a file you create from the information in the form?

Right now my code for the command button is:

Dim strMyPath As String
Dim strMyName As String
strMyPath =" EBEBMainDigital Sender "
strMyName = "Permit " & Me.[Permit Number].Value
DoCmd.OpenReport "File Current Permit", acViewPreview, , "[ID] = " & Me.[ID]
DoCmd.OutputTo acOutputReport, "File Current Permit", acFormatPDF, strMyPath + strMyName, False
DoCmd.Close acReport, "File Current Permit"

And that works perfect for sending the current report to the Digital Sender Folder... but I'd like to be able to send it to a certain county folder within the digital sender folder, based on what is listed for the county on the form. same for municipalities. and then, have it create a folder based on the name inside the form..... how to lead it through the path of the folder through the given information on the form, or how to make it create a folder.

View 9 Replies View Related

Send Report Based On Email Selections?

Oct 1, 2013

I like this form I have that allows me to send attachment when email is entered.However, I would like to have a list box of Name and Email Address. when selected the email address is now set (same as before but just as a drop down) I type my message etc...But the attachment part I would like to send a specific report (that connects to that email address) so that it will only send jobs connected to that person.

Here is the code below:

Private Sub Email_Output_Click()
'
' Email API Outlook example programming code
' Send email from to Outlook
'
Select Case Me.Email_Output_Option

[code]....

View 9 Replies View Related

Reports :: Send Only One Or Two Pages Of A Multi-page Report

Jun 29, 2013

Send only one or two pages of a multi-page report. I have a report that has three pages. I only want to send the first two as a pdf file. Can this be done with VBA? I know it can be done using Exporting Data on the External Data ribbon, but how can I do it via VBA?

View 4 Replies View Related

Modules & VBA :: Scheduled Task - Run Macro To Send Report Out?

Feb 3, 2014

I have a report that I run manually from my computer every day.

This report is created by a macro in microsoft access, then it runs a VBA macro to send it out..

Is there a way that I can add this as a scheduled task since I usually forget to send it out?

View 3 Replies View Related

Modules & VBA :: Can Send A Report Directly To Printer From Code

May 19, 2014

Can you send a report directly to the printer? We have Clients with multiple Contact Notes, by multiple Clinicians, each of these are separate tables. Every month we print two reports for each client that had at least one contact in that date-range. Usually 200 clients, takes a lot of time. My approach so far is a query within a make-table query to get a list of unique client ID's that had one contact in the date-range. Then I use that table in code to create a recordset, use a Do Loop within that where I print the two reports for the 1st client, move to next record and loop. Now that I've got it working I'm not sure how to print all the reports My 1st question, can you send a report directly to the printer from code? The printer is a networked Konica Minolta Biz-hub so I think it can handle that many jobs being queued that fast.

View 4 Replies View Related

Send Report (Job Information) Individually By Email Address

Sep 17, 2013

I have a template report (R_CurrentJobs) with fields from database.

Fields: FirstName, LastName, Email, JoB Number, TechID, TechName, JobLocation etc...

The query Q_CurrentJobs is a list of jobs to send to the tech for today. (These are open jobs queried).

I need to run this query on the report (R_CurrentJObs) and send the report to each tech based on their individual jobs. The jobs are connected to each tech by its TechID.

The report list the job information for each tech (JOb number, Location details etc.)

When I click the button to send the email. I want to email each tech individually based on the Q_CurrentJobs query using R_CurrentJobs. (DoCmd.SendObject)

View 11 Replies View Related

Send Report (PDF Format) Individually By Email Address

Sep 9, 2013

I need to send the report using DoCmd.SendObject. However, I need to send it based on each tech's job via email.

Currently all tech and jobs on the reports together. I need it to pull the email address and only send to that tech its jobs.

Currently I'm using the basic vba code

DoCmd.SendObject acSendReport, "R_DispatchInspectors", acFormatPDF, "email@me.com", , , "Job number", "Please see attached", False

However do I allows this to send individual report connected to email address. (Which will have each tech's specific jobs sent to them only).

table name: Inspectors (this one have their email address)
Table name: JObs
Report name: R_DispatchInspectors

View 3 Replies View Related

Modules & VBA :: Create PDF Of A Report And Send It Via Email - Invalid Use Of Null

Nov 4, 2013

I am using Access 2007 and are a newbie.

I am using the following code (Sendobject) to create a PDF of a report and send it via email to a customer's email address.

Private Sub EmailWorkOrderQuote_Click()
On Error GoTo Err_EmailWorkOrderQuote_Click
Dim stDocName As String
Dim mFilename As String
Dim mEmailAddress As String

[Code] ....

It works fine except that the I want to to able to utilize the ability to send the email with either both the CC and BCC or either or neither as well.

I have a table called "My Company Information" that contains the email addresses for the CC and BCC. If I have values in these fields, everything works great! If I have no values in either of these fields, I get "Invalid use of Null"....

I want to be able to use either both CC and BCC, either CC or BCC, or neither used and it still work.

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved