473,569 Members | 2,617 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting individual information from the last record of a query

If I have a query that returns say, 3 records sorted by date, so that the
latest record is at the bottom of the list, can I then use just the
information from that last record to put onto an external report? The
problem is that I actually need to send the information out to a Microsoft
Word merge document and simple things that you can use subreports for within
Access and therefore have access to more than one query, have to all be
"gettable" from the one query that I use to send the merge data out to the
merge document. Does anyone have any idea for a simple solution for this?

dixie
Nov 12 '05 #1
1 4009
TC
If you want the last record when sorted by field XYZ, try the query:

SELECT TOP 1 * FROM whatever ORDER BY XYZ DESC

HTH,
TC
"dixie" <di****@dogmail .com> wrote in message
news:Mb******** *******@nnrp1.o zemail.com.au.. .
If I have a query that returns say, 3 records sorted by date, so that the
latest record is at the bottom of the list, can I then use just the
information from that last record to put onto an external report? The
problem is that I actually need to send the information out to a Microsoft
Word merge document and simple things that you can use subreports for within Access and therefore have access to more than one query, have to all be
"gettable" from the one query that I use to send the merge data out to the
merge document. Does anyone have any idea for a simple solution for this?

dixie

Nov 12 '05 #2

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

Similar topics

303
17491
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b. Yahoo store was originally written in Lisp. c. Emacs The issues with these will probably come up, so I might as well mention them myself (which...
2
5008
by: SenseForAll | last post by:
First please note I am a novice at VBA and not even that experienced with DAO/ADO and MS-SQL. Any assistance is appreciated. That said... I have an application written in Access w/ VBA. I need to get some data out of a SQL server and into an Access table. I don't know anything about the SQL server data model or structure. I don't have...
1
2684
by: kkrizl | last post by:
I have a form that displays general information about an alarm permit location. There's a subform that shows detailed information about burglar alarms that have gone off at the location. When a new alarm is entered on the subform, I want to print a report that shows the general information and the alarms that were entered. The record source...
5
7210
by: alanspamenglefield | last post by:
Hello group, I have an SQL statement which pulls data from a table as follows: " SELECT tblSites.sites_siteno, " & _ " tblSites.sites_sitename, " & _ " Sum(tblStockResults.stkr_result) AS SumOfstkr_result, " & _ " Sum(tblStockResults.stkr_takings) AS SumOfstkr_takings, " & _
7
11273
by: Aaron Gray | last post by:
I put together the following code to get the href's parameters :- function GetParameters() { var arg = new Object(); var href = document.location.href; if ( href.indexOf( "?") != -1) { var params = href.split( "?");
7
2008
by: Dave | last post by:
Hi all I have a student database where I would like to be able to print just one mailing label, for the student whose record I am currently accessing on the form. I want to be able to click on the command button and have the label print out on my labelwriter. I have done some searching on the web, and found how to print single labels...
12
1734
by: Lennart Anderson | last post by:
I'm having a MySQl table wih a lot of information. I want to present some main fields in a table on one page. Each record do, of course, have a unique ID. The presnted table will have one field as a linked field. I want to be able to click this link, retreive the ID information for that record and then present detailed data for that record on...
1
1427
by: jcocomo | last post by:
Hi there. I am quite new to MS-Access and databases in general, so please bear with me if this is a very basic question. I am trying to create a database in Access 2000 that will track patients as they move from room to room in a hospital setting. I have a table for patient demographics, called “Patients”, one for room numbers and information,...
2
4440
by: srusskinyon | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for statistical purposes. I've been using Here's the situation: I have two main tables:
0
7615
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...
0
8130
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...
1
7677
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...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
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...
0
3653
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...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1223
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
940
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...

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.