Outputting Invididual Records to Users

T

thefonz37

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.
 
J

Jeff Boyce

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
 
T

thefonz37

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.

Jeff Boyce said:
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 said:
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.
 
T

tina

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 said:
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.

Jeff Boyce said:
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 said:
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.
 
T

thefonz37

Awesome, Tina, thanks for your help. I will play around with that and see
what I come up with.

tina said:
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 said:
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.

Jeff Boyce said:
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


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.
 
T

tina

you're welcome :)


thefonz37 said:
Awesome, Tina, thanks for your help. I will play around with that and see
what I come up with.

tina said:
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 said:
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.

:

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


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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top