Hello all,
I am no programer but I have been given a task to create an access program that will take in info from our customer service requests and then generate a report which will be sent off via email. I have the whole program done however i need to know how can you view only the last report. I have a contact number that generates a number for each entered request. so to give a clear idea this is how the program works enter contacts name address phone...etc choose which catalog they request. then i have a button at the bottom that when pressed prompts the email editor with the snapshot view of the reports all i need is to send the report i just entered. If there is a program code that would be helpful. again i am not a programer so if you can provide as much detail that would be great. Thanks!
7 1234
Sorry not enough information to help. Some questions and suggestions though.
I have a contact number that generates a number for each entered request.
Where is this number stored and how does it relate to each report?
all i need is to send the report i just entered
How is the report being generated. What is the records source of the report. You say the report is in sanpshot view but it is generating for all records. It sounds like you need to change the open report code to only show specific record
DoCmd.OpenReport "ReportName", , , "RequestNumber" = Me.RequestNumber
In this case RequestNumber would be a field in the reports record source and on the report (can be invisible) and it would also have to be a textbox on the form.
I have as the contact number it is a auto number that is the key. Yes all i am trying to do is when the report is made i just want it to show the last record entered and that is it. Right now when i double click the report icon i have all the records in there in decending order acording to the auto generate number but i want to only view the last record so that when sending it in an email the receiver does not have too have all the records just the last one that is ment for that person.
I have as the contact number it is a auto number that is the key. Yes all i am trying to do is when the report is made i just want it to show the last record entered and that is it. Right now when i double click the report icon i have all the records in there in decending order acording to the auto generate number but i want to only view the last record so that when sending it in an email the receiver does not have too have all the records just the last one that is ment for that person.
You need to find some way to specify the record. See my suggestion in previous post.
Would the "RequestNumber" be my Contact Number that i have in the report and in the form. this is an auto field. I assume i would enter this code into the On open in an event procedure.
Would the "RequestNumber" be my Contact Number that i have in the report and in the form. this is an auto field.
That should work
I assume i would enter this code into the On open in an event procedure.
No it's behind a command button usually on the form designed to print the report.
Ok i tried that but maybe i am doing something wrong here is what i have for the code:
Private Sub Save_Click()
On Error GoTo Err_Save_Click
Dim stDocName As String
stDocName = "Danly IEM"
DoCmd.RunMacro "Macro1"
DoCmd.OpenReport "Danly IEM", , , "Contact_Number" = Me.Contact_Number
DoCmd.SendObject acSendReport, "Danly IEM", acFormatSNP, "doberg@danly.com", , , "Literature Request", "See the attached file for literature request", True
Exit_Save_Click:
Exit Sub
Err_Save_Click:
MsgBox Err.Description
Resume Exit_Save_Click
End Sub
OK Change to -
-
Private Sub Save_Click()
-
On Error GoTo Err_Save_Click
-
Dim stDocName As String
-
-
stDocName = "Danly IEM"
-
DoCmd.RunMacro "Macro1"
- DoCmd.OpenReport "Danly IEM", , , "[Contact_Number]=" & Me.Contact_Number
-
DoCmd.SendObject acSendReport, "Danly IEM", acFormatSNP, "doberg@danly.com", , , "Literature Request", "See the attached file for literature request", True
-
-
Exit_Save_Click:
-
Exit Sub
-
-
Err_Save_Click:
-
MsgBox Err.Description
-
Resume Exit_Save_Click
-
-
End Sub
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: MGFoster |
last post by:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I've converted an ACC97 .mdb file to an ACC2K2 .adp. A report that
worked in ACC97 doesn't work in ACC2K2.
Report setup:
ACC97 ...
|
by: CSDunn |
last post by:
Hello,
I have a situation with MS Access 2000 in which I need to display report
data in spreadsheet orientation (much like a datasheet view for a form). If
you think of the report in terms of what...
|
by: Melissa |
last post by:
What specifically causes the Format event of a report's section to fire?
Thanks!
Melissa
|
by: VBSponge |
last post by:
Hi all.
In A2K i have a report with a control bound to to calculate
the page count for the report. I need to retrieve this page count from
the report, and build it into a TOC containing this an...
|
by: Orchid |
last post by:
Hello all,
I have different version of reports which used for different months.
For example, I am using report version 1 up to September, but we have
some design changes on the report for October,...
|
by: DeanL |
last post by:
Hi guys,
I'm in need of a little help with a report I'm setting up on Access
2000. The report shows data depending on entries on a form that has 7
fields (Min and Max Cost, Fiscal Year, Min and...
|
by: Dave |
last post by:
On my form I have combo boxes. These combo boxes, after updating
them, populate respective listboxes that are located below the combo
boxes on the same form. I am trying to use a "generate...
|
by: jambonjamasb |
last post by:
Hi
I have two tables:
email_tbl
Data_table
Data table is is used to create a Form
Data_form
|
by: Studiotyphoon |
last post by:
Hi,
I have report which I need to print 3 times, but would like to have
the following headings
Customer Copy - Print 1
Accounts Copy - Print 2
File Copy -Print 3
I created a macro to...
|
by: sara |
last post by:
Hi -
I have a report that is 14 columnar sub-reports (Line up: Position-
holders in each of our 14 locations - Manager, Assistant Manager,
Receiving, Office, etc).
I output directly to PDF...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |