473,396 Members | 2,098 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,396 software developers and data experts.

Filtering records in a query based on field values in adjacent records

I'm looking for a way to filter records in a query (or report) based on
a value in a field of an adjacent record. Can this be done easily? I
cannot find any info in the help files.

Thanks

May 26 '06 #1
3 1998
"sdisalvo" <sd******@earthlink.net> wrote in
news:11**********************@j55g2000cwa.googlegr oups.com:
I'm looking for a way to filter records in a query (or report)
based on a value in a field of an adjacent record. Can this be
done easily? I cannot find any info in the help files.

Thanks

Adjacent is ephemeral. What is the criteria that makes the records
adjacent? a date? a sequence number? If you have an autonumber for
example, the adjacent record will probably have the next higher or
lower number. When we know what makes a record adjacent, we may be
able to find a solution. But not before.
..
--
Bob Quintal

PA is y I've altered my email address.
May 26 '06 #2
Sorry about that. There is an autonumber field in the table that would
work for me.

May 26 '06 #3
"sdisalvo" <sd******@earthlink.net> wrote in
news:11*********************@y43g2000cwc.googlegro ups.com:
Sorry about that. There is an autonumber field in the table
that would work for me.


You could create a query that uses two copies of your table with
the autonumber of the second instance filtered to be equal to the
first instances autonumber +1

untested, but should work.

SELECT a.* from mytable as a, mytable as b
WHERE b.autonum = a.autonum+1
and b.filterfield = "some value"
;
--
Bob Quintal

PA is y I've altered my email address.
May 26 '06 #4

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

Similar topics

3
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I...
19
by: William Wisnieski | last post by:
Hello Everyone, I have a main form with a datasheet subform that I use to query by form. After the user selects two criteria on the main form and clicks the cmdShowResults button on the main...
2
by: Sean | last post by:
Greetings all, I am attempting to make a form that will filter through several tables that (I believe) have refretial integrity. I am pulling data from several tables into the form and i would...
1
by: Monir | last post by:
Hi guys, I made a database with two tables ( tblsender, tblreceiver) with one to many relationship. tblsender has sender_Id (pk) sender_name, address, phone, email etc. tblreceiver has...
0
by: Jason | last post by:
I have a primary form which is used to enter/edit data in a table named Test_Results. On this primary form there is a subform which displays site addresses. This subform is linked to the primary...
1
by: S. van Beek | last post by:
Dear reader, How can I filter a numeric field with Like as criteria in a query. To filter a numeric field with <10 as criteria this will com back with the result of those records for which...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
1
by: MLH | last post by:
I have a form with a subform control on it listing records returned by a saved query named UnbilledVehicles. I would like to put command buttons on the main form to apply dynamic filters to the...
3
by: zandiT | last post by:
Hello I have an access report and im using a query to filter the report using Date parameters eg Start Date-12 May 2009 and End Date-30 September 2009. the query works perfectly. My problem is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.