After update data macro trigger (1 Viewer)

saledo2000

Registered User.
Local time
Today, 11:39
Joined
Jan 21, 2013
Messages
94
Hi everyone,
I have a table tblCompound where is created named data macro which calculate time out of compound
in hours after I insert Exit date and time in frmCompound.
I would like to create after update data macro when customer is more then 48 hours out of compound
to set Departure date to Exit date in tblCustomer. Could you please help with this.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:39
Joined
Oct 29, 2018
Messages
21,358
Hi. Can you post a sample copy of your db?
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 07:39
Joined
Apr 27, 2015
Messages
6,286
While DBG is waiting for your db to be posted, I have a observation. Named Data Macros, I'm pretty sure, are for table-level events that are triggered much like form events.

Although similar in concept, the time to use them differ. From your question, I get the impression that a Form AfterUpdate event, in this case the Departure Date, would be a better option?
 

saledo2000

Registered User.
Local time
Today, 11:39
Joined
Jan 21, 2013
Messages
94
Hi
Thank you for quick reply. Yes you are right but when I set Exit date once I want after 48 hours that data macro sets Departure automatically since I do not enter every day to check who is exceeded time out. This should happen automatically when I open database next time. Than his profile will be inactive which is set with the other procedure on a form. I wonder if you know how to set after update data macro with updated field in IF expression bigger than 48 hours on ExitTime filed.
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 07:39
Joined
Apr 27, 2015
Messages
6,286
Thanks for the extra info. As DBG has asked, it would be much easier going forward to have a copy of your DB, can you post a copy?
 

saledo2000

Registered User.
Local time
Today, 11:39
Joined
Jan 21, 2013
Messages
94
Soory but cannot copy database from the server. It is a company policy but will give you some screenshots.
 

saledo2000

Registered User.
Local time
Today, 11:39
Joined
Jan 21, 2013
Messages
94

Attachments

  • DB_Screenshoot.jpg
    DB_Screenshoot.jpg
    37.4 KB · Views: 148

theDBguy

I’m here to help
Staff member
Local time
Today, 04:39
Joined
Oct 29, 2018
Messages
21,358
Hi
Thank you for quick reply. Yes you are right but when I set Exit date once I want after 48 hours that data macro sets Departure automatically since I do not enter every day to check who is exceeded time out. This should happen automatically when I open database next time. Than his profile will be inactive which is set with the other procedure on a form. I wonder if you know how to set after update data macro with updated field in IF expression bigger than 48 hours on ExitTime filed.
Okay, if you only want to calculate the dates when the app opens, you should be able to use an UPDATE query and execute it with an Autoexec macro.
 

Users who are viewing this thread

Top Bottom