Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need all records but the first

Status
Not open for further replies.

jedder18

Technical User
Mar 4, 2013
29
US
Using Access07

Created a subform where users enter data.
Have an autogenerated number field in the table.
Scenario...

The first data entered will show on a main report.
ANything after the first record needs to show the info on an additional report.

Is their something I can put in the criteria of the autogenerated field[ID]of the query to not show the 1st record?

If the 1st record has a value of 2 in [ID]
I would like records 3, 4, 5, etc only to show up on the additional report and value 2 will show on the main report.

TIA.

Jennifer

Jedder

 
[2thumbsup]that was way too easy for you

Thanks..

I've been using Crystal so long, I forget my access coding.



Jedder

 
I would actually not hard code the value "2" into the query. To get all records other than the minimum ID, I would use something like:

SQL:
SELECT *
FROM [YourUnnamedTable]
WHERE [ID] <> (SELECT Min([ID]) FROM [YourUnnamedTable])

To get the minimum ID, use:

SQL:
SELECT *
FROM [YourUnnamedTable]
WHERE [ID] = (SELECT Min([ID]) FROM [YourUnnamedTable])





Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top