Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Outputting Invididual Records to Users

0 views
Skip to first unread message

thefonz37

unread,
Aug 29, 2008, 2:46:01 PM8/29/08
to
Seems like this should be a simple thing to do, but I can't figure it out for
the life of me.

I have a database that will be used to process employee vacation requests.
After approving or denying the requests, I would like to send the employees
e-mails, letting them know the result of their requests.

I'm working with two tables - one that contains the processed vacation
requests (Request Date/Time, Approval Date/Time, whether it was approved or
denied, the user's name, and if the user was notified of the approval/denial
yet) and another table of employee data (user name, e-mail address). Is
there any way, via macro or any other means, to join those two tables on the
user name and send e-mails for each line in the vacation request table to the
related employee e-mails, letting them know the result of their request?

Thanks in advance.

Jeff Boyce

unread,
Aug 29, 2008, 7:32:21 PM8/29/08
to
Using a [UserName] as a primary key for joining tables is risky. What will
you do when you have two employees named "John Smith"?

Use a query to join tables.

Regards

Jeff Boyce
Microsoft Office/Access MVP


"thefonz37" <thef...@discussions.microsoft.com> wrote in message
news:85875423-CC8E-4E17...@microsoft.com...

thefonz37

unread,
Aug 29, 2008, 8:24:01 PM8/29/08
to
The username field is actually their LAN login they use to sign on to their
computers in the morning, so it will always be unique. I actually have a
query set up already joining on the username, but I don't know how to output
each row of that query to the e-mail address in the row.

tina

unread,
Aug 30, 2008, 4:37:01 PM8/30/08
to
in a VBA module, you can open a Recordset based on the query, and loop
through the records in the recordset, running the DoCmd.SendObject action on
each record.

hth


"thefonz37" <thef...@discussions.microsoft.com> wrote in message

news:8B294B78-CD38-4E23...@microsoft.com...

thefonz37

unread,
Aug 31, 2008, 1:49:00 AM8/31/08
to
Awesome, Tina, thanks for your help. I will play around with that and see
what I come up with.

tina

unread,
Aug 31, 2008, 6:20:31 PM8/31/08
to
you're welcome :)


"thefonz37" <thef...@discussions.microsoft.com> wrote in message

news:CE8403C1-E0F0-4A81...@microsoft.com...

0 new messages