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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get max out of table and replace all zero by max+1

Status
Not open for further replies.

Kweker

Programmer
Feb 4, 2002
12
NL
Is it possible to find all the fields(schoolID) out of table scholen that are zero, then select a few or all of these records, then find maximum [schoolID] and fill the selected [schoolID]."table scholen" with each time maximum number + 1
 
Use an update query on the scholen table with the schoolID field in the grid. set the criteria box to "=0" and the update to box to "Max([schoolID]) +1". Run the query. (N.B. backup the database or table first as the query, once run, is not reversible). Have fun! :eek:)

Alex Middleton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top