473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Report help

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!
Nov 10 '06 #1
7 1234
MMcCarthy
14,534 Expert Mod 8TB
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.
Nov 12 '06 #2
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.
Nov 13 '06 #3
MMcCarthy
14,534 Expert Mod 8TB
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.
Nov 13 '06 #4
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.
Nov 13 '06 #5
MMcCarthy
14,534 Expert Mod 8TB
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.
Nov 13 '06 #6
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
Nov 13 '06 #7
MMcCarthy
14,534 Expert Mod 8TB
OK Change to

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Save_Click()
  3. On Error GoTo Err_Save_Click
  4. Dim stDocName As String
  5.  
  6. stDocName = "Danly IEM"
  7. DoCmd.RunMacro "Macro1"
  8. DoCmd.OpenReport "Danly IEM", , , "[Contact_Number]=" & Me.Contact_Number
  9. DoCmd.SendObject acSendReport, "Danly IEM", acFormatSNP, "doberg@danly.com", , , "Literature Request", "See the attached file for literature request", True
  10.  
  11. Exit_Save_Click:
  12. Exit Sub
  13.  
  14. Err_Save_Click:
  15. MsgBox Err.Description
  16. Resume Exit_Save_Click
  17.  
  18. End Sub
  19.  
Nov 13 '06 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
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 ...
3
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...
3
by: Melissa | last post by:
What specifically causes the Format event of a report's section to fire? Thanks! Melissa
1
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...
12
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,...
3
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...
6
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...
3
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
12
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...
10
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...
0
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,...
0
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$) { } ...
0
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...
0
BarryA
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...
0
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...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.