Re: Last record search not working

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I guess I didn't see the note in the help file. I have other queries that
"Last" seems to be working on. Oh, well, "Max" seems to work just fine, so I
will go with that. Thank you.

"Douglas J. Steele" wrote:

Do you have an ORDER BY clause in your query? Without it, Last will
essentially return a random record. As it says in the Help file "Because
records are usually returned in no particular order (unless the query
includes an ORDER BY clause), the records returned by these functions will
be arbitrary."

It sounds like you should be using Max instead of Last.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Dave Couch" <DaveCouch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:423A7E81-23E5-4ECC-84D4-6D8F0BD2FF2A@xxxxxxxxxxxxxxxx
Access 2003. I have a table with 1831 records with a last key index value
(ProposalID) of 1831. I have set up a query to select the last record in
the
table. I am using the "Last" selection in the Total row. When I run the
query, it will only show record 1816, not the last record. I have tried
recreating the query with no luck. All of the data in the fields looks
correct and the ID field is an "autonumber" field. I have used this
procedure on other tables with success. I can't figure out what is wrong
with this table. I did a "compact and repair" on the database. Any ideas
out there?

Dave



.



Relevant Pages

  • Re: Module not working
    ... yes I made it a module in the module area. ... "Douglas J. Steele" wrote: ... function in your query. ... Doug Steele, Microsoft Access MVP ...
    (microsoft.public.access.gettingstarted)
  • Re: Query wont alpha Combo Box
    ... not the query for the combo box but when I looked at the combobox ... "Douglas J. Steele" wrote: ... Doug Steele, Microsoft Access MVP ... customer name, address, etc. based the 2nd table, a Customer List ...
    (microsoft.public.access.forms)
  • Re: Pass query parameters through multiple queries
    ... You are the man, Douglas. ... before the query runs: Access will not open the form for you. ... Doug Steele, Microsoft Access MVP ... these reports is based on a parameter query that requires the user to ...
    (microsoft.public.access.modulesdaovba)
  • Re: Row Source of cbo
    ... "Douglas J. Steele" wrote: ... Doug Steele, Microsoft Access MVP ... and what's the SQL for the query you have to join the tables (to ... supplies table. ...
    (microsoft.public.access.formscoding)
  • Re: Workday Function - Holidays
    ... "Douglas J. Steele" wrote: ... Doug Steele, Microsoft Access MVP ... Here's a portion of the query: ...
    (microsoft.public.access.gettingstarted)