Automatically update data based on two records entered

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need some help with a query...(maybe)..

I have a form that is used to enter data related to my table...the information entered consists of a Social security number and two dates (the first is current date, i.e. today; the second is a future date). If I use this form again for the same social security number before the future date, I need the future date to change to the current date of the second entry

For example

SSN Current Future SSN Current Futur
123 04/21/04 04/30/04 Changed To ----> 123 04/21/04 04/25/0
123 04/25/04 05/01/04 123 04/25/04 05/01/0

I thought that I would be able to use a query to update this data, but am having trouble. Any help is appreciated. Happy Secretaries day to everyone who reads.....
 
Do you really want to override the date _whenever_ the form is opened on
that SSN, or do you want to override it only if the record is to be
changed/saved?

In the first case, in the OnCurrent event, set the value of the TextBox
displaying the future date to the current date, something like:

Me!txtFutureDate = Date()

In the second case, set it in the BeforeUpdate event of the Form.

Larry Linson
Microsoft Access MVP

clueless said:
I need some help with a query...(maybe)...

I have a form that is used to enter data related to my table...the
information entered consists of a Social security number and two dates (the
first is current date, i.e. today; the second is a future date). If I use
this form again for the same social security number before the future date,
I need the future date to change to the current date of the second entry.
For example:

SSN Current Future
SSN Current Future
123 04/21/04 04/30/04 Changed To ---->
123 04/21/04 04/25/04
123 04/25/04 05/01/04
123 04/25/04 05/01/04
I thought that I would be able to use a query to update this data, but am
having trouble. Any help is appreciated. Happy Secretaries day to everyone
who reads.....
 
Back
Top