RE: Help with a (relatively simple?) query



All of the previous records do have date fields that record the date the data
was entered. This new function that I'm creating the query for, however,
would only be for use with future data, as it's a genuinely new feature for a
genuinely new process- they've no interest in doing this for past data. I
had been using the autonumber- I didn't realize it was quite such a liability.


So, presuming I add a field with a default value of =Now(), to tblConsEffort-
how would I structure that query?

Always happy to give you more info if you'd like. Thanks for your help. :)

-Bonnie

Jerry Whittle wrote:
How do you know which record in the main table is the most recent one? If you
say the autonumber field, go directly to jail and do not pass go! Autonumbers
are not guaranteed to be sequential and the next one could well be a negative
number!

Also you can't depend on the last record being the bottom one when you open
up the table. The next time you open the table, that record could be
somewhere else in the table.

What I use in these situations is a Date/Time field in the table with a
default of Now(). Unless you have more than one record being added in a
second, for example an append query or multiple users entering records, you
can tell the last record added by doing a Max on the date/time field. Of
course you'll need to somehow add dates to the existing records as a default
value only works on added records and not existing data.
I know I'm missing something terribly obvious here, but I just can't put my
finger on it.
[quoted text clipped - 55 lines]
them will necessarily have a value- the tblReveg, tblInControl, tblTrailWork
stuff, specificially.

--
Message posted via http://www.accessmonster.com

.



Relevant Pages

  • Re: Query expression criteria- Access cant recognize column as da
    ... What do you mean exactly by "calculated field"? ... I entered it in the 'criteria' box in the design view of the query ... > data from the text field into the date/time field. ... >> and Access always puts quotes on it, I assume because it is reading the ...
    (microsoft.public.access.queries)
  • Re: How do I sort the an autonumber field to show only the highest va.
    ... You might use a query whose SQL looks something like this: ... Perhaps a more direct way of finding the "last" invoice would be to add a ... Is the Date/Time field allowed to be changed? ... > displayed...(the highest number generated by the autonumber field) How do ...
    (microsoft.public.access.queries)
  • Re: Pivot Table in Report - Duane H.
    ... I think you missed what Duane said. ... "Claire" wrote in message ... > BTW, dtmInputDate is a Date/Time field, txtReportYear is just an unbound ... >> I have used a form to set a year parameter, the query needs to see the ...
    (microsoft.public.access.queries)
  • Re: wildcard date search
    ... Presumably you typed this expression into the Criteria row in query design, ... the date/time field has no date entry ... In query design view, choose Parameters on the Query menu. ...
    (microsoft.public.access.queries)
  • Re: Querying only x number of records
    ... Indeed, with Jet, building the query statement at runtime seems the fastest ... lets also assume that you have a date/time field ...
    (microsoft.public.access.queries)