Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Access Developer" Newsgroups: comp.databases.ms-access Subject: Re: Selecting a value from a particluar record number/Quartiles Date: Thu, 31 Mar 2011 21:33:59 -0500 Lines: 38 Message-ID: <8vkrsbFu3eU1@mid.individual.net> References: X-Trace: individual.net RmTRqJROyAL6IPE4QWbO6gQwF2q4Sw8aSn7PcUiZxx6ZqZt0iC Cancel-Lock: sha1:VBZuJN1BskCC/9KoDM1IcdMexwI= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-RFC2646: Format=Flowed; Original Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-access:738 Also, I believe "Value" is an Access reserved word, and using it as a variable name can, though it won't necessarily and consistently, cause "unexpected results". Access MVP Allen Browne has an "issue checker" that checks for things that potentially can cause problems in your database. Among many other things, it checks for improper use of reserved words. You'll find it at: http://allenbrowne.com/appissuechecker.html Larry Linson Microsoft Office Access MVP "Laura" wrote in message news:fbb8fa76-22e4-4a77-94f2-df0e5f8e726e@a17g2000yqn.googlegroups.com... > Hi, > > I have a table with two columns of data: LA and VALUE. The column is > sorted by VALUE, in ascending order. > > I have a recordset that counts the number of records in the table and > stores this as a variable (TotalRecords). I have another variable > that calculates the record that is 1/4 of the way down (Quart1 = > TotalRecords / 4) > > I now need to be able to select the VALUE from the table where the > record number = QUART1 and store this value as another variable (for > use in reports, queries and a table later on). > > Is this possible or is there a better way to do this? I havent got a > sort id in the table - is this the only way to do it? If so, is there > a better way to add a a sort id to a table automatically using VBA > code? > > Many thanks > > Laura