Get Value from Previous Record for this record

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

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.
 
Mock up a query.

Switch to SQL View (View menu.)

Copy the SQL statement.

Paste into the Field row.

Modify the SQL to get what you need.
 
Mock up a query.

Switch to SQL View (View menu.)

Copy the SQL statement.

Paste into the Field row.

Modify the SQL to get what you need.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html






- Show quoted text -

I get a syntax error when Modify the SQL to get what I need. All I
have in my query is Year and playerID and if the year of the previuos
field is the same as this current field I want the playerID to display
[playerID]&"and" &[playerID].
 
Post the SQL that doesn't work, Chris.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Chris said:
Mock up a query.

Switch to SQL View (View menu.)

Copy the SQL statement.

Paste into the Field row.

Modify the SQL to get what you need.










- Show quoted text -

I get a syntax error when Modify the SQL to get what I need. All I
have in my query is Year and playerID and if the year of the previuos
field is the same as this current field I want the playerID to display
[playerID]&"and" &[playerID].
 
Back
Top