Add record and Update (1 Viewer)

argel

Registered User.
Local time
Today, 15:01
Joined
Feb 7, 2019
Messages
29
Hi guys ! I'm trying to create a New Record Form and I want to add the new record to a table and update a field of that record in other table. To let you understand better my problem: I have a table with all my Equipment (EQ_LIST) and a table with several moves of that equipment (LOC_LIST), linked by ID field. Each move of the equipment have a date. What I want is to every time I add a move of certain equipment, the most recent date of that equipment appear in the field of "EQ_LIST" . Can someone help me?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:01
Joined
Oct 29, 2018
Messages
21,358
Hi. Also, you don’t need a field in EQ_LIST to store the latest move date. You can just use a Totals query for that.
 

argel

Registered User.
Local time
Today, 15:01
Joined
Feb 7, 2019
Messages
29
This sounds like it can be accomplished with a simple form and subform.

The main form would be based on EQ_LIST and allow entry/edit of a piece of equipment. Then below would be a subform. That form would be based on LOC_LIST and detail the moves of that piece of equipment:

Thanks for the answer and help! I have a form like you're saying, but only for read. I really want a form just for add that movement and update the most recent date in the other table. That's because I want that my co-workers can add movements on the location table, but the list of the equipment table also have to be always update. The equipment list is the "main database".
 

plog

Banishment Pending
Local time
Today, 08:01
Joined
May 11, 2011
Messages
11,613
Oh sorry didn't fully comprehend what you wanted. Now that I do my answer is: Don't.

You don't store redundant data. What you want to do will store this data in 2 places, there's no point. So TheDBGuy is correct, when you want the latest location of a piece of equipment you use a query to obtain it and you do not store it.
 

argel

Registered User.
Local time
Today, 15:01
Joined
Feb 7, 2019
Messages
29
Hi. Also, you don’t need a field in EQ_LIST to store the latest move date. You can just use a Totals query for that.

Ok ! I was thinking in the wrong way! Thanks for the help !
 

argel

Registered User.
Local time
Today, 15:01
Joined
Feb 7, 2019
Messages
29
Oh sorry didn't fully comprehend what you wanted. Now that I do my answer is: Don't.

You don't store redundant data. What you want to do will store this data in 2 places, there's no point. So TheDBGuy is correct, when you want the latest location of a piece of equipment you use a query to obtain it and you do not store it.

Ok ! Thanks for the help !
 

Users who are viewing this thread

Top Bottom