Hein- The simplest way to get a counter is to put your query into a report, add a text box with a Control Source set to =1 and set the Running Sum property to Over All. To do it in a query involves using a subquery or DCount, but I'd have to know the names of your columns and the sequence (ORDER BY) of the query. Post the SQL of the query to which you want to add this count.
John Viescas, author "Building Microsoft Access Applications" "Microsoft Office Access 2003 Inside Out" "Running Microsoft Access 2000" "SQL Queries for Mere Mortals" http://www.viescas.com/ > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of heinvdvegt > Sent: Friday, August 05, 2005 7:59 AM > To: [email protected] > Subject: [ms_access] counting rows > > > Who can help me with a problem that I would like to be solved. > > Is it possible to add in a query a column that counts 1, 2, 3 etc all > the way to the last record. > > I can imagine a solution like "counter = counter + 1", but I don't > know how to put it in code. > > Is it possible that, everytime you open the query it starts with 1. > It > is not really necessary for my solution but it "looks better". > > The goal I have for my question is that in my database for > speedskating times I want to check if a higher position in a race > also > has a higher time > > Thanks in advance > Hein > > > > > ------------------------ Yahoo! Groups Sponsor > --------------------~--> > <font face=arial size=-1><a > href="http://us.ard.yahoo.com/SIG=12hjfh31q/M=362329.6886308.7 > 839368.1510227/D=groups/S=1705115370:TM/Y=YAHOO/EXP=1123253972 > /A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?p > age_id=1992 > ">Fair play? Video games influencing politics. Click and talk > back!</a>.</font> > -------------------------------------------------------------- > ------~-> > > > Yahoo! Groups Links > > > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h5favdp/M=362335.6886445.7839731.1510227/D=groups/S=1705115370:TM/Y=YAHOO/EXP=1123262788/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!</a>.</font> --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/ms_access/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
