Thanks very much for this explanation, Albert. This is very helpful, and I'll remember it for next time.
Access web app - Data Macro - Where Condition for new record
This works fine to send an email after new record is created. I’ve tested it. However, without the Where Condition under “Look up a record in” it just defaults to record ID=1. How can I set the Where Condition to get the highest ID (for the new record just created)? Doesn’t seem to be a Max function that I can find.
Microsoft 365 and Office | Access | For home | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
15 answers
Sort by: Most helpful
-
Anonymous
2015-09-21T23:01:19+00:00 -
Anonymous
2015-09-23T13:47:03+00:00 Thanks, again, Albert. I don't know if it's okay to add a new question to the same thread or not, but this is closely related, so I'll give it a try.
Now that we can see what works for an email notification for a new record, I have a variation on that. How can I modify the "Look up a Record In" and "Where Condition" where a notification is to be sent when a user updates a date field (or a checkbox)? Again, maybe just the syntax of the Where Condition?
Thanks. Walt
-
Anonymous
2015-09-24T21:47:52+00:00 How can I modify the "Look up a Record In" and "Where Condition" where a notification is to be sent when a user updates a date field (or a checkbox)? Again, maybe just the syntax of the Where Condition?
Where do you put your parameter?
As you can only find the value in a table,so I guess you create a table named tblParameter with a field named lastID and populate a value first then create/modify a macro to find the value and send email like you have done before.
-
Anonymous
2015-09-24T22:31:35+00:00 Thanks. I am updating the value (a date) in a control on a View. When the record is saved, I want it to recognize the record that it was saved to, and send an email referencing the updated record.
-
Anonymous
2015-09-25T19:39:26+00:00 I think you can also use an additional column to recognise which line has been updated just as you have dealt with new record you posted as below.
As to me, i prefer to asp.net because your method may have difficult in set default value when you edit a line .
can Access web be visited by smart phone of Android?
also i guess the OA365 may only support limited clients according to your licence.
your post: added a new field to the table, named EmailSent (Yes/No), set all the previous records values to "Yes". Then, when new record created, the value of EmailSent defaulted to "No" so we could pick that record. Then, we were able to grab the info needed from that record to include in the email notification. After the email was sent, we set the value of EmailSent to "Yes."