Re: Previous record

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Allen et al,

This is not exactly what I am looking for, I don't believe or I may need
more of the syntax for the query portion of this record. The end result was
the previous record of the Form's current record. I need the previous record
of the resultant query (not the table) because the previous record in the
Table is another vehicle. I need the previous record of the Form's current
vehicle's battery.

This is extremely difficult where I am headed with this form. I apologize
for being so vague. Perhaps the following will help make it clearer:

ID Vehicle Battery Last Battery

101 002 028 006
102 005 005 010
103 007 013 025
104 002 004 (this need to auto update
to 006 from 101 above) Current form record

Thanks for any additional help.

--
Dan Johnson


"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> wrote in message
news:eDMbLvhXFHA.1256@xxxxxxxxxxxxxxxxxxxxxxx
> See:
> Referring to a Field in the Previous Record or Next Record
> at:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;210504
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia.
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "Dan Johnson" <dan_johnson@xxxxxxxxxxx> wrote in message
> news:O1fnxphXFHA.612@xxxxxxxxxxxxxxxxxxxxxxx
> Hello,
>
> I have a rather lengthy question in regard to updating a field based on
> the Previous record's input. We have electric vehicles that utilize
> batteries for their operation. There are 13 vehicles with approximately 2
> battery changes per day in a group of 28 batteries. As an operator changes
> the battery in the vehicle, I would like to automatically input that
> current battery into the now Last battery field within a form for the data
> entry.
>
> I have been able to get two queries written to isolate down to the current
> record. Based on the form's current record, the first query filters to ALL
> of that specific vehicle's records. The second query isolates down to the
> ID (AutoNumber) of the current vehicle. This is the point at which I am
> stumped
>
> I haven't been able to figure out how to go to the Previous Battery for
> that record (vehicle battery change) in an effort to do a later copy via
> macro.
>
> I currently have the form updating with the Last Battery but that doesn't
> work because the Form needs to have the ability to make corrections on
> older records. Since one of the older records happened, in some cases, a
> month before the Last Battery was installed, it actually needs to be that
> record's Previous record.
>
> Unfortunately, I am not proficient in VB and am limited to the wizards for
> queries.
>
> I apologize for this lengthy request. Thanks, in advance for any
> suggestions for this problem.
>
> --
> Dan Johnson
>
>
>


.



Relevant Pages

  • Re: Previous record
    ... If you try to store it, you must respond to every insert, edit, or delete, ... > I already have another query that orders the list of vehicles down to the ... I need the Last Battery field populated with Battery 028 ... > from the battery that should be in the vehicle currently. ...
    (microsoft.public.access.queries)
  • Re: Previous record
    ... I already have another query that orders the list of vehicles down to the ... I need the Last Battery field populated with Battery 028 ... from the battery that should be in the vehicle currently. ... > stores the date and time of the battery change. ...
    (microsoft.public.access.queries)
  • Re: Previous record
    ... stores the date and time of the battery change. ... If that field is named "ChangeDateTime", you could create a query and type ... > in the Table is another vehicle. ...
    (microsoft.public.access.queries)
  • Previous record
    ... There are 13 vehicles with approximately 2 battery changes per day in a group of 28 batteries. ... The second query isolates down to the ID of the current vehicle. ... I currently have the form updating with the Last Battery but that doesn't work because the Form needs to have the ability to make corrections on older records. ...
    (microsoft.public.access.queries)
  • Re: help pulling data from a query
    ... It's now dead easy to create a query that joins this table to your main table, so that the query just returns the scanned units. ... Tips for Access users - http://allenbrowne.com/tips.html ... if the battery should be replaced again or not. ... I have a form with a text box in it where i barcode scan all the units in. ...
    (microsoft.public.access.forms)