473,799 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft Access 97 report

I am trying to create a report which only displays the most current
record so the user can publish with word just the most current record
to email this out to a DL.
Thank you in advance.

Nov 13 '05 #1
7 1985
Hi Heather

I had to do the very same thing (in Access 2000, hope its the same) -
but before I go into how let me make sure I understand you correctly.
Should the report be triggered from a form? So when you are looking at
a certain record in a form you can click and button and the record you
were viewing is outputted to word?

If yes, then this is how I did it.

1. Create your report. The report does not need to be based on a
query or have a datasource.

2. Drop unbound text boxes into the reports to hold your fields. Type
the names of the fields in your form into the report text boxes in the
following format:
=[Forms]![nameOfYourFormG oes Here]!nameOfFieldGoe s Here
This is telling the report to use the currently selected record of the
specified form as the source for the specified field. Obviously for
the report to work the form must be open and a record selected.

3. Save your report. Go into Macros section, and create a new macro.
Set the first action for your Macro to 'OutputTo'. Set object type to
'Report', set object name to the name of your report, set output
format to Rich Text Format, and set the other fields here according to
your preference. Save the macro.

4. Open your form in design view and drop a command button into an
appropriate place. In the properties for your button, under 'on click'
select your newly create macro.

That should be it - although as an extra you could even get Access to
fire up the e-mail and attach the Word doc. To do this you use the
macro command 'SendObject'.

Hope this is what you were looking for!

Nov 13 '05 #2
Hi Heather,

You must have already designed your report for the wizard to do its best
work.

In design mode on the form in question and with wizards enabled on the
Toolbox, select the command button and create a command button on your form.
The wizard will step you through it. When the wizard is done. You'll need
to get into the event code for the Click procedure and insert a WHERE clause
something like

"[PeopleID] = " & PeopleID

in the OpenReport line.

HTH
--
-Larry-
--

"Heather" <HW******@cox.n et> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
I am trying to create a report which only displays the most current
record so the user can publish with word just the most current record
to email this out to a DL.
Thank you in advance.

Nov 13 '05 #3
This works great! The way it is displayed now is my form is still
fine. My report now displays the correct data (only the current
record) except it puts it on as many pages as my form is. For example,
My form is 5 pages. (01/05/05, 01/06/05, 01/07/05, 01/08/05, 01/09/05)
My report displays (01/09/05, 01/09/05, 01/09/05, 01/09/05, 01/09/05)
Is there syntax to only display one of these pages?

Nov 13 '05 #4
Hi Heather,

I don't understand your design. If the Primary Key field of your underlying
table is PeopleID then the where clause I gave you would open the report
with just one record in the report. Paste the code below into the Click
event of your Print Command Button. Substitute the names of the objects in
your application for the names in the subroutine below. The code below was
copied from the Click event of a command button that opens a report
Previewing one Person's record.

=============== =============== =============== ===========
Private Sub cmdPrintPersonR ecord_Click()
On Error GoTo Err_cmdPrintPer sonRecord_Click

Dim DocName As String

Me.Refresh

DocName = "rptLionPeo ple"
DoCmd.OpenRepor t DocName, A_PREVIEW, , "[PeopleID] = " & PeopleID

Exit_cmdPrintPe rsonRecord_Clic k:
Exit Sub

Err_cmdPrintPer sonRecord_Click :
MsgBox Error$
Resume Exit_cmdPrintPe rsonRecord_Clic k

End Sub
=============== =============== =============== ==============

If the code doesn't work for you then post back with more information about
the design of your application. Especially give the name of the underlying
table and the names and datatypes of the first several fields in it. If the
above code returns several records then the Primary Key isn't a primary key
at all. When you set a primary key, no duplicates are allowed.

HTH
--
-Larry-
--

"Heather" <HW******@cox.n et> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
This works great! The way it is displayed now is my form is still
fine. My report now displays the correct data (only the current
record) except it puts it on as many pages as my form is. For example,
My form is 5 pages. (01/05/05, 01/06/05, 01/07/05, 01/08/05, 01/09/05)
My report displays (01/09/05, 01/09/05, 01/09/05, 01/09/05, 01/09/05)
Is there syntax to only display one of these pages?

Nov 13 '05 #5
Hello Larry,
You are probably confused because that reply was supposed to be
attached and directed to boiled egg's response. I tried to click on
show options next to boiled eggs name and send that person an email,
but i dont know if it got there. I really appreciate the help though.
Maybe you can help by reading my original message at the top I guess
you see what I see, and then reading boiled eggs response and then my
question to boiled egg. Sorry for the confusion.
Heather

Nov 13 '05 #6
Boiled Egg,
This works great! The way it is displayed now is my form is still
fine. My report now displays the correct data (only the current
record) except it puts it on as many pages as my form is. For example,
My form is 5 pages. (01/05/05, 01/06/05, 01/07/05, 01/08/05, 01/09/05)
My report displays (01/09/05, 01/09/05, 01/09/05, 01/09/05, 01/09/05)
Is there syntax to only display one of these pages?
Does this have something to do with the primary key?
Thank you.
Heather

Nov 13 '05 #7
Hi Heather,

You'd have to give us your table design and the design (SQL) of the query in
your report to better understand your issue. As I understand it now you're
getting identical data on several printed pages with different dates on each
page. What does that mean? A different date where. how displayed?

--
-Larry-
--

"Heather" <HW******@cox.n et> wrote in message
news:11******** **************@ c13g2000cwb.goo glegroups.com.. .
Boiled Egg,
This works great! The way it is displayed now is my form is still
fine. My report now displays the correct data (only the current
record) except it puts it on as many pages as my form is. For example,
My form is 5 pages. (01/05/05, 01/06/05, 01/07/05, 01/08/05, 01/09/05)
My report displays (01/09/05, 01/09/05, 01/09/05, 01/09/05, 01/09/05)
Is there syntax to only display one of these pages?
Does this have something to do with the primary key?
Thank you.
Heather

Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2949
by: Joris Kempen | last post by:
Hi people, I know that the question has come around sometimes: How to open an Access Report using ASP and export it to for example RTF. I'm trying to implement the first method of David Cline: http://www.15seconds.com/issue/981216.htm
8
3539
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At the moment the printed output is usually going to Word. It's turning into an unholy mess, because I'm having to prepare umpteen different Word templates, and the queries that drive them, depending on what events a course has.
1
2649
by: ellipsys | last post by:
- Open Access 2003 - Create new database (2000 or 2002/2003 format) - Create a report and insert a label in its Detail section - Save the report as Report1 - Copy Report1 as Report2 - Open Report1 and insert Report2 in it as subreport - Save Report1 - Create a form and use the wizard to insert a button which can open Report1 for preview - Go to VBE and navigate to the Click event of the button
1
3206
by: Brian Barnes | last post by:
I've been searching using google trying to find a way to display Access Reports via ASP.NET and only finding commericial products which appear to require that the report needs to be converted every time that a change is made (this is not ideal for my situation). What I need is something that references the access reports (the data itself is in MS SQL Server) and will display them. Some of the solutions to this I have come across are...
6
3683
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as development of reports, it is certainly fine in my book. But for end-users, with little experience or training, it would be nice to have an easy way to handle various selection criteria, perhaps with relatively stock reports. I see easy to use by...
5
1600
by: enginerd477 | last post by:
I am having trouble getting my database to do what i want. I have a form with autonumbers which are going to be the numbers of some inventory. the inventory has reports in word or other program. The file name is going to be the number generated by access, but every file will be saved in the same folder. i was wondering if there was a way to click on the button and then have the comput search the correct folder linking the number in...
0
1723
by: vaahini | last post by:
i have upgraded our database from microsoft access 97 to microsoft access 2000. While executing i face problem (Unknown database found) in crystal report 7.0. How to solve this problem. the platform used is VB.Plz reply me .....
8
3420
by: gersam | last post by:
I have Microsoft Access 2003 and i have a report of Crystal Report 10, i want to configure the Crystal report viewer in Microsoft Access to run this report, but i don't know how to do it. The report get data of the same Data base, we require do this because we don't have an intranet and the user doesn't have crystal report licences. Thanks for your help.
0
1292
by: flomaster | last post by:
Hi, I have created a c# application which uses Microsoft Access Reports. The application works ok on my laptop but when I installed it on other pcs ( more than 5 ) the following problem appears. If I open a report only once through the application, then the report looks ok. When I try to open the same report again the fields in the page header section of the report are missing, but all other details are visible. Any ideas why I get this...
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9543
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10488
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10237
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7567
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4144
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.