On Mar 7, 8:57 am, "Chris" <chrislab...@gmail.comwrote:
On Mar 7, 3:20 am, "Allen Browne" <AllenBro...@SeeSig.Invalidwrote:
Use a subquery to read the value from the other row in the same table.
Example:
http://allenbrowne.com/subquery-01.html#AnotherRecord
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Chris" <chrislab...@gmail.comwrote in message
news:11**********************@v33g2000cwv.googlegr oups.com...
Is it possiable to have a iif function in a query where it looks at
the next record. for example if I run the query which lists years and
if the results in record 2 equals the result in record 1 then it
displays an X.- Hide quoted text -
- Show quoted text -
I a newbie to access and that seems way over my head, if there a way
to do it in design view???
I a newbie to access and that seems way over my head, if there a way
to do it in design view???
This is easy to do in Excel, but part of the point of a database is
that the rows are not related to each other. What you are looking to
do is not hard, but takes doing a few steps:
copy the data into a new table called newTable with a new serial
number field called serial. (unless you already have a serial field
that has no gaps)
Create a query based on newTable called newQuery. Add a calculated
field called nextRecord: = serial + 1, as well the year field and any
other field you want
Make a new query called results that includes the new table and the
new query, joined from serial to nextRecord
make a calculated field in the new query called isEqual: =
iif(newQuery!year = newTable!year,"X","")
You can use any field, table, or query name you want.
There you have it. hth.